From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- maintenance/doMaintenance.php | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'maintenance/doMaintenance.php') diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index 3bd508cb..46844c9d 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -44,6 +44,7 @@ if ( !$maintClass || !class_exists( $maintClass ) ) { } // Get an object to start us off +/** @var Maintenance $maintenance */ $maintenance = new $maintClass(); // Basic sanity checks and such @@ -77,37 +78,24 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) { # Use a callback function to configure MediaWiki call_user_func( MW_CONFIG_CALLBACK ); } else { - if ( file_exists( "$IP/../wmf-config/wikimedia-mode" ) ) { - // Load settings, using wikimedia-mode if needed - // @todo FIXME: Replace this hack with general farm-friendly code - # @todo FIXME: Wikimedia-specific stuff needs to go away to an ext - # Maybe a hook? - global $cluster; - $cluster = 'pmtpa'; - require "$IP/../wmf-config/wgConf.php"; - } // Require the configuration (probably LocalSettings.php) require $maintenance->loadSettings(); } -if ( $maintenance->getDbType() === Maintenance::DB_ADMIN && - is_readable( "$IP/AdminSettings.php" ) ) -{ - require "$IP/AdminSettings.php"; -} - if ( $maintenance->getDbType() === Maintenance::DB_NONE ) { - if ( $wgLocalisationCacheConf['storeClass'] === false && ( $wgLocalisationCacheConf['store'] == 'db' || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) ) { - $wgLocalisationCacheConf['storeClass'] = 'LCStore_Null'; + if ( $wgLocalisationCacheConf['storeClass'] === false + && ( $wgLocalisationCacheConf['store'] == 'db' + || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) ) + ) { + $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull'; } } + +$maintenance->setConfig( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) ); $maintenance->finalSetup(); // Some last includes require_once "$IP/includes/Setup.php"; -// Much much faster startup than creating a title object -$wgTitle = null; - // Do the work try { $maintenance->execute(); -- cgit v1.2.2