2004-10-13 07:38:43 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Run all updaters.
|
|
|
|
|
*
|
|
|
|
|
* @todo document
|
|
|
|
|
* @package MediaWiki
|
|
|
|
|
* @subpackage Maintenance
|
2005-08-02 13:35:19 +00:00
|
|
|
*/
|
2004-10-13 07:38:43 +00:00
|
|
|
|
|
|
|
|
/** */
|
2005-04-25 12:03:57 +00:00
|
|
|
$options = array( 'quick' );
|
2004-10-13 07:38:43 +00:00
|
|
|
require_once( "commandLine.inc" );
|
|
|
|
|
require_once( "updaters.inc" );
|
|
|
|
|
$wgTitle = Title::newFromText( "MediaWiki database updater" );
|
2005-08-02 13:35:19 +00:00
|
|
|
$dbclass = 'Database'.ucfirst($wgDBtype);
|
|
|
|
|
require_once("$dbclass.php");
|
|
|
|
|
$dbc = new $dbclass;
|
|
|
|
|
$wgDatabase = $dbc->newFromParams( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname );
|
2004-10-13 07:38:43 +00:00
|
|
|
|
2004-12-10 06:05:30 +00:00
|
|
|
print "Going to run database updates for $wgDBname\n";
|
|
|
|
|
print "Depending on the size of your database this may take a while!\n";
|
|
|
|
|
|
2005-04-25 12:03:57 +00:00
|
|
|
if( !isset( $options['quick'] ) ) {
|
2005-06-22 10:11:08 +00:00
|
|
|
print "Abort with control-c in the next five seconds... ";
|
2005-08-02 13:35:19 +00:00
|
|
|
|
2005-04-25 12:03:57 +00:00
|
|
|
for ($i = 5; $i >= 0; --$i) {
|
|
|
|
|
echo $i;
|
|
|
|
|
sleep(1);
|
|
|
|
|
echo( ($i == 0) ? "\n" : chr(8) );
|
|
|
|
|
}
|
2005-03-09 15:12:19 +00:00
|
|
|
}
|
2004-12-10 06:05:30 +00:00
|
|
|
|
2004-10-13 07:38:43 +00:00
|
|
|
do_all_updates();
|
|
|
|
|
|
|
|
|
|
print "Done.\n";
|
|
|
|
|
|
|
|
|
|
?>
|