* Typo: </log> => </loc>
[lhc/web/wiklou.git] / maintenance / update.php
1 <?php
2 require_once 'counter.php';
3 /**
4 * Run all updaters.
5 *
6 * @todo document
7 * @package MediaWiki
8 * @subpackage Maintenance
9 */
10
11 /** */
12 $wgUseMasterForMaintenance = true;
13 $options = array( 'quick' );
14 require_once( "commandLine.inc" );
15 require_once( "updaters.inc" );
16 $wgTitle = Title::newFromText( "MediaWiki database updater" );
17 $dbclass = 'Database'.ucfirst($wgDBtype);
18 require_once("$dbclass.php");
19 $dbc = new $dbclass;
20 $wgDatabase = $dbc->newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
21
22 print "Going to run database updates for $wgDBname\n";
23 print "Depending on the size of your database this may take a while!\n";
24
25 if( !isset( $options['quick'] ) ) {
26 print "Abort with control-c in the next five seconds... ";
27
28 for ($i = 6; $i >= 1;) {
29 print_c($i, --$i);
30 sleep(1);
31 }
32 die();
33 }
34
35 do_all_updates();
36
37 print "Done.\n";
38
39 ?>