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