X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=dcf05518fddc23d85cfc5d9e8855a8be7ec4a782;hb=f3bdd2f4a1796c95490796a521f0d31f4a4ee9af;hp=b830b7006a6efb97cab8b47daa155408dafc66af;hpb=e80ff96c373454b1cf6fd65a6af8a9ae282f0f55;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index b830b7006a..dcf05518fd 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -412,14 +412,17 @@ abstract class Installer { // This will be overridden in the web installer with the user-specified language RequestContext::getMain()->setLanguage( 'en' ); - // Disable the i18n cache - // TODO: manage LocalisationCache singleton in MediaWikiServices - Language::getLocalisationCache()->disableBackend(); - // Disable all global services, since we don't have any configuration yet! MediaWikiServices::disableStorageBackend(); $mwServices = MediaWikiServices::getInstance(); + + // Disable i18n cache + $mwServices->getLocalisationCache()->disableBackend(); + + // Clear language cache so the old i18n cache doesn't sneak back in + Language::clearCaches(); + // Disable object cache (otherwise CACHE_ANYTHING will try CACHE_DB and // SqlBagOStuff will then throw since we just disabled wfGetDB) $wgObjectCaches = $mwServices->getMainConfig()->get( 'ObjectCaches' ); @@ -1768,7 +1771,7 @@ abstract class Installer { '', EDIT_NEW, false, - User::newFromName( 'MediaWiki default' ) + User::newSystemUser( 'MediaWiki default' ) ); } catch ( Exception $e ) { // using raw, because $wgShowExceptionDetails can not be set yet @@ -1820,6 +1823,10 @@ abstract class Installer { // Don't try to use any object cache for SessionManager either. $GLOBALS['wgSessionCacheType'] = CACHE_NONE; + + // Set a dummy $wgServer to bypass the check in Setup.php, the + // web installer will automatically detect it and not use this value. + $GLOBALS['wgServer'] = 'https://🌻.invalid'; } /**