]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/upgrade.php
added missing nl
[SourceForge/phpwiki.git] / lib / upgrade.php
1 <?php //-*-php-*-
2 rcs_id('$Id: upgrade.php,v 1.29 2004-11-29 16:08:31 rurban Exp $');
3
4 /*
5  Copyright 2004 $ThePhpWikiProgrammingTeam
6
7  This file is part of PhpWiki.
8
9  PhpWiki is free software; you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation; either version 2 of the License, or
12  (at your option) any later version.
13
14  PhpWiki is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  GNU General Public License for more details.
18
19  You should have received a copy of the GNU General Public License
20  along with PhpWiki; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23
24
25 /**
26  * Upgrade the WikiDB and config settings after installing a new 
27  * PhpWiki upgrade.
28  * Status: experimental, no queries for verification yet, no db update,
29  *         no merge conflict
30  *
31  * Installation on an existing PhpWiki database needs some 
32  * additional worksteps. Each step will require multiple pages.
33  *
34  * This is the plan:
35  *  1. Check for new or changed database schema and update it 
36  *     according to some predefined upgrade tables. (medium)
37  *  2. Check for new or changed (localized) pgsrc/ pages and ask 
38  *     for upgrading these. Check timestamps, upgrade silently or 
39  *     show diffs if existing. Overwrite or merge (easy)
40  *  3. Check for new or changed or deprecated index.php/config.ini settings
41  *     and help in upgrading these. (hard)
42  *  3a Convert old-style index.php into config/config.ini. (easy)
43  *  4. Check for changed plugin invocation arguments. (hard)
44  *  5. Check for changed theme variables. (hard)
45  *  6. Convert the automatic update to a class-based multi-page 
46  *     version. (hard)
47
48  * Done: overwrite=1 link on edit conflicts at first occurence "Overwrite all".
49  *
50  * @author: Reini Urban
51  */
52 require_once("lib/loadsave.php");
53 //define('DBADMIN_USER','rurban');
54 //define('DBADMIN_PASSWD','');
55
56 /**
57  * TODO: check for the pgsrc_version number, not the revision mtime only
58  */
59 function doPgsrcUpdate(&$request,$pagename,$path,$filename) {
60     $dbi = $request->getDbh(); 
61     $page = $dbi->getPage($pagename);
62     if ($page->exists()) {
63         // check mtime: update automatically if pgsrc is newer
64         $rev = $page->getCurrentRevision();
65         $page_mtime = $rev->get('mtime');
66         $data  = implode("", file($path."/".$filename));
67         if (($parts = ParseMimeifiedPages($data))) {
68             usort($parts, 'SortByPageVersion');
69             reset($parts);
70             $pageinfo = $parts[0];
71             $stat  = stat($path."/".$filename);
72             $new_mtime = @$pageinfo['versiondata']['mtime'];
73             if (!$new_mtime)
74                 $new_mtime = @$pageinfo['versiondata']['lastmodified'];
75             if (!$new_mtime)
76                 $new_mtime = @$pageinfo['pagedata']['date'];
77             if (!$new_mtime)
78                 $new_mtime = $stat[9];
79             if ($new_mtime > $page_mtime) {
80                 echo "$path/$pagename: ",_("newer than the existing page."),
81                     _(" replace "),"($new_mtime &gt; $page_mtime)","<br />\n";
82                 LoadAny($request,$path."/".$filename);
83                 echo "<br />\n";
84             } else {
85                 echo "$path/$pagename: ",_("older than the existing page."),
86                     _(" skipped"),".<br />\n";
87             }
88         } else {
89             echo "$path/$pagename: ",("unknown format."),
90                     _(" skipped"),".<br />\n";
91         }
92     } else {
93         echo sprintf(_("%s does not exist"),$pagename),"<br />\n";
94         LoadAny($request,$path."/".$filename);
95         echo "<br />\n";
96     }
97 }
98
99 /** need the english filename (required precondition: urlencode == urldecode)
100  *  returns the plugin name.
101  */ 
102 function isActionPage($filename) {
103     static $special = array("DebugInfo"         => "_BackendInfo",
104                             "PhpWikiRecentChanges" => "RssFeed",
105                             "ProjectSummary"    => "RssFeed",
106                             "RecentReleases"    => "RssFeed",
107                             );
108     $base = preg_replace("/\..{1,4}$/","",basename($filename));
109     if (isset($special[$base])) return $special[$base];
110     if (FindFile("lib/plugin/".$base.".php",true)) return $base;
111     else return false;
112 }
113
114 function CheckActionPageUpdate(&$request) {
115     echo "<h3>",_("check for necessary ActionPage updates"),"</h3>\n";
116     $dbi = $request->getDbh(); 
117     $path = FindFile('pgsrc');
118     $pgsrc = new fileSet($path);
119     // most actionpages have the same name as the plugin
120     $loc_path = FindLocalizedFile('pgsrc');
121     foreach ($pgsrc->getFiles() as $filename) {
122         if (substr($filename,-1,1) == '~') continue;
123         $pagename = urldecode($filename);
124         if (isActionPage($filename)) {
125             $translation = gettext($pagename);
126             if ($translation == $pagename)
127                 doPgsrcUpdate($request, $pagename, $path, $filename);
128             elseif (FindLocalizedFile('pgsrc/'.urlencode($translation),1))
129                 doPgsrcUpdate($request, $translation, $loc_path, 
130                               urlencode($translation));
131             else
132                 doPgsrcUpdate($request, $pagename, $path, $filename);
133         }
134     }
135 }
136
137 // see loadsave.php for saving new pages.
138 function CheckPgsrcUpdate(&$request) {
139     echo "<h3>",_("check for necessary pgsrc updates"),"</h3>\n";
140     $dbi = $request->getDbh(); 
141     $path = FindLocalizedFile(WIKI_PGSRC);
142     $pgsrc = new fileSet($path);
143     // fixme: verification, ...
144     $isHomePage = false;
145     foreach ($pgsrc->getFiles() as $filename) {
146         if (substr($filename,-1,1) == '~') continue;
147         $pagename = urldecode($filename);
148         // don't ever update the HomePage
149         if (defined(HOME_PAGE))
150             if ($pagename == HOME_PAGE) $isHomePage = true;
151         else
152             if ($pagename == _("HomePage")) $isHomePage = true;
153         if ($pagename == "HomePage") $isHomePage = true;
154         if ($isHomePage) {
155             echo "$path/$pagename: ",_("always skip the HomePage."),
156                 _(" skipped"),".<br />\n";
157             $isHomePage = false;
158             continue;
159         }
160         if (!isActionPage($filename)) {
161             doPgsrcUpdate($request,$pagename,$path,$filename);
162         }
163     }
164     return;
165 }
166
167 /**
168  * TODO: Search table definition in appropriate schema
169  *       and create it.
170  * Supported: mysql and generic SQL, for ADODB and PearDB.
171  */
172 function installTable(&$dbh, $table, $backend_type) {
173     global $DBParams;
174     if (!in_array($DBParams['dbtype'],array('SQL','ADODB'))) return;
175     echo _("MISSING")," ... \n";
176     $backend = &$dbh->_backend->_dbh;
177     /*
178     $schema = findFile("schemas/${backend_type}.sql");
179     if (!$schema) {
180         echo "  ",_("FAILED"),": ",sprintf(_("no schema %s found"),"schemas/${backend_type}.sql")," ... <br />\n";
181         return false;
182     }
183     */
184     extract($dbh->_backend->_table_names);
185     $prefix = isset($DBParams['prefix']) ? $DBParams['prefix'] : '';
186     switch ($table) {
187     case 'session':
188         assert($session_tbl);
189         if ($backend_type == 'mysql') {
190             $dbh->genericSqlQuery("
191 CREATE TABLE $session_tbl (
192         sess_id         CHAR(32) NOT NULL DEFAULT '',
193         sess_data       BLOB NOT NULL,
194         sess_date       INT UNSIGNED NOT NULL,
195         sess_ip         CHAR(15) NOT NULL,
196         PRIMARY KEY (sess_id),
197         INDEX (sess_date)
198 )");
199         } else {
200             $dbh->genericSqlQuery("
201 CREATE TABLE $session_tbl (
202         sess_id         CHAR(32) NOT NULL DEFAULT '',
203         sess_data       ".($backend_type == 'pgsql'?'TEXT':'BLOB')." NOT NULL,
204         sess_date       INT,
205         sess_ip         CHAR(15) NOT NULL
206 )");
207             $dbh->genericSqlQuery("CREATE UNIQUE INDEX sess_id ON $session_tbl (sess_id)");
208         }
209         $dbh->genericSqlQuery("CREATE INDEX sess_date on session (sess_date)");
210         echo "  ",_("CREATED");
211         break;
212     case 'user':
213         $user_tbl = $prefix.'user';
214         if ($backend_type == 'mysql') {
215             $dbh->genericSqlQuery("
216 CREATE TABLE $user_tbl (
217         userid  CHAR(48) BINARY NOT NULL UNIQUE,
218         passwd  CHAR(48) BINARY DEFAULT '',
219         PRIMARY KEY (userid)
220 )");
221         } else {
222             $dbh->genericSqlQuery("
223 CREATE TABLE $user_tbl (
224         userid  CHAR(48) NOT NULL,
225         passwd  CHAR(48) DEFAULT ''
226 )");
227             $dbh->genericSqlQuery("CREATE UNIQUE INDEX userid ON $user_tbl (userid)");
228         }
229         echo "  ",_("CREATED");
230         break;
231     case 'pref':
232         $pref_tbl = $prefix.'pref';
233         if ($backend_type == 'mysql') {
234             $dbh->genericSqlQuery("
235 CREATE TABLE $pref_tbl (
236         userid  CHAR(48) BINARY NOT NULL UNIQUE,
237         prefs   TEXT NULL DEFAULT '',
238         PRIMARY KEY (userid)
239 )");
240         } else {
241             $dbh->genericSqlQuery("
242 CREATE TABLE $pref_tbl (
243         userid  CHAR(48) NOT NULL,
244         prefs   TEXT NULL DEFAULT '',
245 )");
246             $dbh->genericSqlQuery("CREATE UNIQUE INDEX userid ON $pref_tbl (userid)");
247         }
248         echo "  ",_("CREATED");
249         break;
250     case 'member':
251         $member_tbl = $prefix.'member';
252         if ($backend_type == 'mysql') {
253             $dbh->genericSqlQuery("
254 CREATE TABLE $member_tbl (
255         userid    CHAR(48) BINARY NOT NULL,
256         groupname CHAR(48) BINARY NOT NULL DEFAULT 'users',
257         INDEX (userid),
258         INDEX (groupname)
259 )");
260         } else {
261             $dbh->genericSqlQuery("
262 CREATE TABLE $member_tbl (
263         userid    CHAR(48) NOT NULL,
264         groupname CHAR(48) NOT NULL DEFAULT 'users',
265 )");
266             $dbh->genericSqlQuery("CREATE INDEX userid ON $member_tbl (userid)");
267             $dbh->genericSqlQuery("CREATE INDEX groupname ON $member_tbl (groupname)");
268         }
269         echo "  ",_("CREATED");
270         break;
271     case 'rating':
272         $rating_tbl = $prefix.'rating';
273         if ($backend_type == 'mysql') {
274             $dbh->genericSqlQuery("
275 CREATE TABLE $rating_tbl (
276         dimension INT(4) NOT NULL,
277         raterpage INT(11) NOT NULL,
278         rateepage INT(11) NOT NULL,
279         ratingvalue FLOAT NOT NULL,
280         rateeversion INT(11) NOT NULL,
281         tstamp TIMESTAMP(14) NOT NULL,
282         PRIMARY KEY (dimension, raterpage, rateepage)
283 )");
284         } else {
285             $dbh->genericSqlQuery("
286 CREATE TABLE $rating_tbl (
287         dimension INT(4) NOT NULL,
288         raterpage INT(11) NOT NULL,
289         rateepage INT(11) NOT NULL,
290         ratingvalue FLOAT NOT NULL,
291         rateeversion INT(11) NOT NULL,
292         tstamp TIMESTAMP(14) NOT NULL,
293 )");
294             $dbh->genericSqlQuery("CREATE UNIQUE INDEX rating ON $rating_tbl (dimension, raterpage, rateepage)");
295         }
296         echo "  ",_("CREATED");
297         break;
298     case 'accesslog':
299         $log_tbl = $prefix.'accesslog';
300         // fields according to http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/#id2756178
301         /*
302 A       User Agent agent        varchar(255)    Mozilla/4.0 (compat; MSIE 6.0; Windows)
303 a       CGi request arguments   request_args    varchar(255)    user=Smith&cart=1231&item=532
304 b       Bytes transfered        bytes_sent      int unsigned    32561
305 c???    Text of cookie  cookie  varchar(255)    Apache=sdyn.fooonline.net 1300102700823
306 f       Local filename requested        request_file    varchar(255)    /var/www/html/books-cycroad.html
307 H       HTTP request_protocol   request_protocol        varchar(10)     HTTP/1.1
308 h       Name of remote host     remote_host     varchar(50)     blah.foobar.com
309 I       Request ID (from modd_unique_id)        id      char(19)        POlFcUBRH30AAALdBG8
310 l       Ident user info remote_logname  varcgar(50)     bobby
311 M       Machine ID???   machine_id      varchar(25)     web01
312 m       HTTP request method     request_method  varchar(10)     GET
313 P       httpd cchild PID        child_pid       smallint unsigned       3215
314 p       http port       server_port     smallint unsigned       80
315 R       Referer referer varchar(255)    http://www.biglinks4u.com/linkpage.html
316 r       Request in full form    request_line    varchar(255)    GET /books-cycroad.html HTTP/1.1
317 S       Time of request in UNIX time_t format   time_stamp      int unsigned    1005598029
318 T       Seconds to service request      request_duration        smallint unsigned       2
319 t       Time of request in human format request_time    char(28)        [02/Dec/2001:15:01:26 -0800]
320 U       Request in simple form  request_uri     varchar(255)    /books-cycroad.html
321 u       User info from HTTP auth        remote_user     varchar(50)     bobby
322 v       Virtual host servicing the request      virtual_host    varchar(255)
323         */
324         $dbh->genericSqlQuery("
325 CREATE TABLE $log_tbl (
326         time_stamp    int unsigned,
327         remote_host   varchar(50),
328         remote_user   varchar(50),
329         request_method varchar(10),
330         request_line  varchar(255),
331         request_args  varchar(255),
332         request_uri   varchar(255),
333         request_time  char(28),
334         status        smallint unsigned,
335         bytes_sent    smallint unsigned,
336         referer       varchar(255), 
337         agent         varchar(255),
338         request_duration float
339 )");
340         $dbh->genericSqlQuery("CREATE INDEX log_time ON $log_tbl (time_stamp)");
341         $dbh->genericSqlQuery("CREATE INDEX log_host ON $log_tbl (remote_host)");
342         echo "  ",_("CREATED");
343         break;
344     }
345     echo "<br />\n";
346 }
347
348 /**
349  * currently update only session, user, pref and member
350  * jeffs-hacks database api (around 1.3.2) later
351  *   people should export/import their pages if using that old versions.
352  */
353 function CheckDatabaseUpdate(&$request) {
354     global $DBParams, $DBAuthParams;
355     if (!in_array($DBParams['dbtype'], array('SQL','ADODB'))) return;
356     echo "<h3>",_("check for necessary database updates"),"</h3>\n";
357     if (defined('DBADMIN_USER') and DBADMIN_USER) {
358         // if need to connect as the root user, for alter permissions
359         $AdminParams = $DBParams;
360         if ($DBParams['dbtype'] == 'SQL')
361             $dsn = DB::parseDSN($AdminParams['dsn']);
362         else
363             $dsn = parseDSN($AdminParams['dsn']);
364         $AdminParams['dsn'] = sprintf("%s://%s:%s@%s/%s",
365                                       $dsn['phptype'],
366                                       DBADMIN_USER,
367                                       DBADMIN_PASSWD,
368                                       $dsn['hostspec'],
369                                       $dsn['database']);
370         $dbh = WikiDB::open($AdminParams);
371     } else {
372         $dbh = &$request->_dbi;
373     }
374     $tables = $dbh->_backend->listOfTables();
375     $backend_type = $dbh->_backend->backendType();
376     $prefix = isset($DBParams['prefix']) ? $DBParams['prefix'] : '';
377     foreach (explode(':','session:user:pref:member') as $table) {
378         echo sprintf(_("check for table %s"), $table)," ...";
379         if (!in_array($prefix.$table, $tables)) {
380             installTable($dbh, $table, $backend_type);
381         } else {
382             echo _("OK")," <br />\n";
383         }
384     }
385     if (ACCESS_LOG_SQL) {
386         $table = "accesslog";
387         echo sprintf(_("check for table %s"), $table)," ...";
388         if (!in_array($prefix.$table, $tables)) {
389             installTable($dbh, $table, $backend_type);
390         } else {
391             echo _("OK")," <br />\n";
392         }
393     }
394     $backend = &$dbh->_backend->_dbh;
395     // 1.3.8 added session.sess_ip
396     if (phpwiki_version() >= 1030.08 and USE_DB_SESSION and isset($request->_dbsession)) {
397         echo _("check for new session.sess_ip column")," ... ";
398         $database = $dbh->_backend->database();
399         assert(!empty($DBParams['db_session_table']));
400         $session_tbl = $prefix . $DBParams['db_session_table'];
401         $sess_fields = $dbh->_backend->listOfFields($database, $session_tbl);
402         if (!strstr(strtolower(join(':', $sess_fields)),"sess_ip")) {
403             // TODO: postgres test (should be able to add columns at the end, but not in between)
404             echo "<b>",_("ADDING"),"</b>"," ... ";              
405             $dbh->genericSqlQuery("ALTER TABLE $session_tbl ADD sess_ip CHAR(15) NOT NULL");
406             $dbh->genericSqlQuery("CREATE INDEX sess_date ON $session_tbl (sess_date)");
407         } else {
408             echo _("OK");
409         }
410         echo "<br />\n";
411     }
412     // 1.3.10 mysql requires page.id auto_increment
413     // mysql, mysqli or mysqlt
414     if (phpwiki_version() >= 1030.099 and substr($backend_type,0,5) == 'mysql') {
415         echo _("check for page.id auto_increment flag")," ...";
416         extract($dbh->_backend->_table_names);
417         assert(!empty($page_tbl));
418         $database = $dbh->_backend->database();
419         $fields = mysql_list_fields($database, $page_tbl, $dbh->_backend->connection());
420         $columns = mysql_num_fields($fields); 
421         for ($i = 0; $i < $columns; $i++) {
422             if (mysql_field_name($fields, $i) == 'id') {
423                 $flags = mysql_field_flags($fields, $i);
424                 //DONE: something was wrong with ADODB here.
425                 if (!strstr(strtolower($flags), "auto_increment")) {
426                     echo "<b>",_("ADDING"),"</b>"," ... ";
427                     // MODIFY col_def valid since mysql 3.22.16,
428                     // older mysql's need CHANGE old_col col_def
429                     $dbh->genericSqlQuery("ALTER TABLE $page_tbl CHANGE id id INT NOT NULL AUTO_INCREMENT");
430                     $fields = mysql_list_fields($database, $page_tbl);
431                     if (!strstr(strtolower(mysql_field_flags($fields, $i)), "auto_increment"))
432                         echo " <b><font color=\"red\">", _("FAILED"), "</font></b><br />\n";
433                     else     
434                         echo _("OK"), "<br />\n";
435                 } else {
436                     echo _("OK"), "<br />\n";                           
437                 }
438                 break;
439             }
440         }
441         mysql_free_result($fields);
442     }
443     // check for mysql 4.1.x/5.0.0a binary search problem.
444     //   http://bugs.mysql.com/bug.php?id=4398
445     // "select * from page where LOWER(pagename) like '%search%'" does not apply LOWER!
446     // confirmed for 4.1.0alpha,4.1.3-beta,5.0.0a; not yet tested for 4.1.2alpha,
447     // TODO: there's another known workaround, not yet applied. on windows only.
448     if (isWindows() and substr($backend_type,0,5) == 'mysql') {
449         echo _("check for mysql 4.1.x/5.0.0 binary search on windows problem")," ...";
450         $result = mysql_query("SELECT VERSION()",$dbh->_backend->connection());
451         $row = mysql_fetch_row($result);
452         $mysql_version = $row[0];
453         $arr = explode('.',$mysql_version);
454         $version = (string)(($arr[0] * 100) + $arr[1]) . "." . (integer)$arr[2];
455         if ($version >= 401.0) {
456             $dbh->genericSqlQuery("ALTER TABLE $page_tbl CHANGE pagename pagename VARCHAR(100) NOT NULL;");
457             echo sprintf(_("version <em>%s</em> <b>FIXED</b>"), $mysql_version),"<br />\n";     
458         } else {
459             echo sprintf(_("version <em>%s</em> not affected"), $mysql_version),"<br />\n";
460         }
461     }
462     return;
463 }
464
465 function fixConfigIni($match, $new) {
466     $file = FindFile("config/config.ini");
467     $found = false;
468     if (is_writable($file)) {
469         $in = fopen($file,"rb");
470         $out = fopen($tmp = tempnam(FindFile("uploads"),"cfg"),"wb");
471         if (isWindows())
472             $tmp = str_replace("/","\\",$tmp);
473         while ($s = fgets($in)) {
474             if (preg_match($match, $s)) {
475                 $s = $new . (isWindows() ? "\r\n" : "\n");
476                 $found = true;
477             }
478             fputs($out, $s);
479         }
480         fclose($in);
481         fclose($out);
482         if (!$found) {
483             echo " <b><font color=\"red\">",_("FAILED"),"</font></b>: ",
484                 sprintf(_("%s not found"), $match);
485             unlink($out);
486         } else {
487             @unlink("$file.bak");
488             @rename($file,"$file.bak");
489             if (rename($tmp, $file))
490                 echo " <b>",_("FIXED"),"</b>";
491             else {
492                 echo " <b>",_("FAILED"),"</b>: ";
493                 sprintf(_("couldn't move %s to %s"), $tmp, $file);
494                 return false;
495             }
496         }
497         return $found;
498     } else {
499         echo " <b><font color=\"red\">",_("FAILED"),"</font></b>: ",
500             sprintf(_("%s is not writable"), $file);
501         return false;
502     }
503 }
504
505 function CheckConfigUpdate(&$request) {
506     echo "<h3>",_("check for necessary config updates"),"</h3>\n";
507     echo _("check for old CACHE_CONTROL = NONE")," ... ";
508     if (defined('CACHE_CONTROL') and CACHE_CONTROL == '') {
509         echo "<br />&nbsp;&nbsp;",_("CACHE_CONTROL is set to 'NONE', and must be changed to 'NO_CACHE'")," ...";
510         fixConfigIni("/^\s*CACHE_CONTROL\s*=\s*NONE/","CACHE_CONTROL = NO_CACHE");
511     } else {
512         echo _("OK");
513     }
514     echo "<br />\n";
515     echo _("check for GROUP_METHOD = NONE")," ... ";
516     if (defined('GROUP_METHOD') and GROUP_METHOD == '') {
517         echo "<br />&nbsp;&nbsp;",_("GROUP_METHOD is set to NONE, and must be changed to \"NONE\"")," ...";
518         fixConfigIni("/^\s*GROUP_METHOD\s*=\s*NONE/","GROUP_METHOD = \"NONE\"");
519     } else {
520         echo _("OK");
521     }
522     echo "<br />\n";
523 }
524
525 /**
526  * TODO:
527  *
528  * Upgrade: Base class for multipage worksteps
529  * identify, validate, display options, next step
530  */
531 class Upgrade {
532 }
533
534 class Upgrade_CheckPgsrc extends Upgrade {
535 }
536
537 class Upgrade_CheckDatabaseUpdate extends Upgrade {
538 }
539
540 // TODO: At which step are we? 
541 // validate and do it again or go on with next step.
542
543 /** entry function from lib/main.php
544  */
545 function DoUpgrade($request) {
546
547     if (!$request->_user->isAdmin()) {
548         $request->_notAuthorized(WIKIAUTH_ADMIN);
549         $request->finish(
550                          HTML::div(array('class' => 'disabled-plugin'),
551                                    fmt("Upgrade disabled: user != isAdmin")));
552         return;
553     }
554
555     StartLoadDump($request, _("Upgrading this PhpWiki"));
556     CheckActionPageUpdate($request);
557     CheckDatabaseUpdate($request);
558     CheckPgsrcUpdate($request);
559     //CheckThemeUpdate($request);
560     CheckConfigUpdate($request);
561     EndLoadDump($request);
562 }
563
564
565 /**
566  $Log: not supported by cvs2svn $
567  Revision 1.28  2004/11/16 16:25:14  rurban
568  fix accesslog tablename, print CREATED only if really done
569
570  Revision 1.27  2004/11/07 16:02:52  rurban
571  new sql access log (for spam prevention), and restructured access log class
572  dbh->quote (generic)
573  pear_db: mysql specific parts seperated (using replace)
574
575  Revision 1.26  2004/10/14 19:19:34  rurban
576  loadsave: check if the dumped file will be accessible from outside.
577  and some other minor fixes. (cvsclient native not yet ready)
578
579  Revision 1.25  2004/09/06 08:28:00  rurban
580  rename genericQuery to genericSqlQuery
581
582  Revision 1.24  2004/07/05 13:56:22  rurban
583  sqlite autoincrement fix
584
585  Revision 1.23  2004/07/04 10:28:06  rurban
586  DBADMIN_USER fix
587
588  Revision 1.22  2004/07/03 17:21:28  rurban
589  updated docs: submitted new mysql bugreport (#1491 did not fix it)
590
591  Revision 1.21  2004/07/03 16:51:05  rurban
592  optional DBADMIN_USER:DBADMIN_PASSWD for action=upgrade (if no ALTER permission)
593  added atomic mysql REPLACE for PearDB as in ADODB
594  fixed _lock_tables typo links => link
595  fixes unserialize ADODB bug in line 180
596
597  Revision 1.20  2004/07/03 14:48:18  rurban
598  Tested new mysql 4.1.3-beta: binary search bug as fixed.
599  => fixed action=upgrade,
600  => version check in PearDB also (as in ADODB)
601
602  Revision 1.19  2004/06/19 12:19:09  rurban
603  slightly improved docs
604
605  Revision 1.18  2004/06/19 11:47:17  rurban
606  added CheckConfigUpdate: CACHE_CONTROL = NONE => NO_CACHE
607
608  Revision 1.17  2004/06/17 11:31:50  rurban
609  check necessary localized actionpages
610
611  Revision 1.16  2004/06/16 10:38:58  rurban
612  Disallow refernces in calls if the declaration is a reference
613  ("allow_call_time_pass_reference clean").
614    PhpWiki is now allow_call_time_pass_reference = Off clean,
615    but several external libraries may not.
616    In detail these libs look to be affected (not tested):
617    * Pear_DB odbc
618    * adodb oracle
619
620  Revision 1.15  2004/06/07 19:50:40  rurban
621  add owner field to mimified dump
622
623  Revision 1.14  2004/06/07 18:38:18  rurban
624  added mysql 4.1.x search fix
625
626  Revision 1.13  2004/06/04 20:32:53  rurban
627  Several locale related improvements suggested by Pierrick Meignen
628  LDAP fix by John Cole
629  reanable admin check without ENABLE_PAGEPERM in the admin plugins
630
631  Revision 1.12  2004/05/18 13:59:15  rurban
632  rename simpleQuery to genericSqlQuery
633
634  Revision 1.11  2004/05/15 13:06:17  rurban
635  skip the HomePage, at first upgrade the ActionPages, then the database, then the rest
636
637  Revision 1.10  2004/05/15 01:19:41  rurban
638  upgrade prefix fix by Kai Krakow
639
640  Revision 1.9  2004/05/14 11:33:03  rurban
641  version updated to 1.3.11pre
642  upgrade stability fix
643
644  Revision 1.8  2004/05/12 10:49:55  rurban
645  require_once fix for those libs which are loaded before FileFinder and
646    its automatic include_path fix, and where require_once doesn't grok
647    dirname(__FILE__) != './lib'
648  upgrade fix with PearDB
649  navbar.tmpl: remove spaces for IE &nbsp; button alignment
650
651  Revision 1.7  2004/05/06 17:30:38  rurban
652  CategoryGroup: oops, dos2unix eol
653  improved phpwiki_version:
654    pre -= .0001 (1.3.10pre: 1030.099)
655    -p1 += .001 (1.3.9-p1: 1030.091)
656  improved InstallTable for mysql and generic SQL versions and all newer tables so far.
657  abstracted more ADODB/PearDB methods for action=upgrade stuff:
658    backend->backendType(), backend->database(),
659    backend->listOfFields(),
660    backend->listOfTables(),
661
662  Revision 1.6  2004/05/03 15:05:36  rurban
663  + table messages
664
665  Revision 1.4  2004/05/02 21:26:38  rurban
666  limit user session data (HomePageHandle and auth_dbi have to invalidated anyway)
667    because they will not survive db sessions, if too large.
668  extended action=upgrade
669  some WikiTranslation button work
670  revert WIKIAUTH_UNOBTAINABLE (need it for main.php)
671  some temp. session debug statements
672
673  Revision 1.3  2004/04/29 22:33:30  rurban
674  fixed sf.net bug #943366 (Kai Krakow)
675    couldn't load localized url-undecoded pagenames
676
677  Revision 1.2  2004/03/12 15:48:07  rurban
678  fixed explodePageList: wrong sortby argument order in UnfoldSubpages
679  simplified lib/stdlib.php:explodePageList
680
681  */
682
683 // For emacs users
684 // Local Variables:
685 // mode: php
686 // tab-width: 8
687 // c-basic-offset: 4
688 // c-hanging-comment-ender-p: nil
689 // indent-tabs-mode: nil
690 // End:
691 ?>