Make resolveConflictOn() accept a prefix different from the page name (needed for...
[lhc/web/wiklou.git] / maintenance / update.php
1 <?php
2 /**
3 * Run all updaters.
4 *
5 * This is used when the database schema is modified and we need to apply patches.
6 *
7 * @file
8 * @todo document
9 * @ingroup Maintenance
10 */
11
12 /** */
13 $wgUseMasterForMaintenance = true;
14 require_once( dirname(__FILE__) . '/commandLine.inc' );
15 require( "updaters.inc" );
16
17 # Don't try to load stuff from l10n_cache yet
18 $lc = Language::getLocalisationCache();
19 $lc->disableBackend();
20
21 $wgTitle = Title::newFromText( "MediaWiki database updater" );
22
23 echo( "MediaWiki {$wgVersion} Updater\n\n" );
24
25 install_version_checks();
26
27 # Attempt to connect to the database as a privileged user
28 # This will vomit up an error if there are permissions problems
29 $wgDatabase = wfGetDB( DB_MASTER );
30
31 print "Going to run database updates for ".wfWikiID()."\n";
32 print "Depending on the size of your database this may take a while!\n";
33
34 if( !isset( $options['quick'] ) ) {
35 print "Abort with control-c in the next five seconds... ";
36 wfCountDown( 5 );
37 }
38
39 $shared = isset( $options['doshared'] );
40 $purge = !isset( $options['nopurge'] );
41
42 do_all_updates( $shared, $purge );
43
44 print "Done.\n";
45
46