revisions
* (bug 8214) Output file size limit and actual file size in appropriate units
on Special:Upload
+* (bug 8016) Purge objectcache table during upgrade processes - use the --nopurge
+ option to prevent this when running maintennace/update.php
== Languages updated ==
/** */
$wgUseMasterForMaintenance = true;
-$options = array( 'quick' );
+$options = array( 'quick', 'nopurge' );
require_once( "commandLine.inc" );
require_once( "updaters.inc" );
$wgTitle = Title::newFromText( "MediaWiki database updater" );
echo "\n";
}
-if ( isset( $options['doshared'] ) ) {
- $doShared = true;
-} else {
- $doShared = false;
-}
+$shared = isset( $options['doshared'] );
+$purge = !isset( $options['nopurge'] );
-do_all_updates( $doShared );
+do_all_updates( $shared, $purge );
print "Done.\n";
}
}
-function do_all_updates( $doShared = false ) {
+function purge_cache() {
+ global $wgDatabase;
+ # We can't guarantee that the user will be able to use TRUNCATE,
+ # but we know that DELETE is available to us
+ echo( "Purging caches..." );
+ $wgDatabase->delete( 'objectcache', '*', __METHOD__ );
+ echo( "done.\n" );
+}
+
+function do_all_updates( $shared = false, $purge = true ) {
global $wgNewTables, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgDatabase, $wgDBtype;
$doUser = !$wgSharedDB || $doShared;
do_backlinking_indices_update(); flush();
initialiseMessages(); flush();
+
+ if( $purge ) {
+ purge_cache();
+ flush();
+ }
}
function archive($name) {