X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=43bc2d8de3d84d44af363346aa40539380240a6a;hb=1ddc66a395c0994bf7c5fe7baa4522fe913aae9e;hp=41d59455cfe6400352ff7c2ccad05d3550229f3f;hpb=56d45558b102349f3480a46819669407aa3be2d6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 41d59455cf..43bc2d8de3 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -86,11 +86,6 @@ MediaWiki\HeaderCallback::register(); * Load LocalSettings.php */ -if ( is_readable( "$IP/StartProfiler.php" ) ) { - // @deprecated since 1.32: Use LocalSettings.php instead. - require "$IP/StartProfiler.php"; -} - if ( defined( 'MW_CONFIG_CALLBACK' ) ) { call_user_func( MW_CONFIG_CALLBACK ); } else { @@ -278,7 +273,7 @@ $wgGalleryOptions += [ ]; /** - * Initialise $wgLocalFileRepo from backwards-compatible settings + * Shortcuts for $wgLocalFileRepo */ if ( !$wgLocalFileRepo ) { $wgLocalFileRepo = [ @@ -294,8 +289,15 @@ if ( !$wgLocalFileRepo ) { 'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0 ]; } + +if ( !isset( $wgLocalFileRepo['backend'] ) ) { + // Create a default FileBackend name. + // FileBackendGroup will register a default, if absent from $wgFileBackends. + $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend'; +} + /** - * Initialise shared repo from backwards-compatible settings + * Shortcuts for $wgForeignFileRepos */ if ( $wgUseSharedUploads ) { if ( $wgSharedUploadDBname ) { @@ -346,13 +348,6 @@ if ( $wgUseInstantCommons ) { 'apiThumbCacheExpiry' => 0, ]; } -/* - * Add on default file backend config for file repos. - * FileBackendGroup will handle initializing the backends. - */ -if ( !isset( $wgLocalFileRepo['backend'] ) ) { - $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend'; -} foreach ( $wgForeignFileRepos as &$repo ) { if ( !isset( $repo['directory'] ) && $repo['class'] === ForeignAPIRepo::class ) { $repo['directory'] = $wgUploadDirectory; // b/c @@ -774,7 +769,7 @@ if ( $wgCommandLineMode ) { wfDebug( $debug ); } -$wgMemc = wfGetMainCache(); +$wgMemc = ObjectCache::getLocalClusterInstance(); $messageMemc = wfGetMessageCacheStorage(); wfDebugLog( 'caches', @@ -794,9 +789,9 @@ $ps_globals = Profiler::instance()->scopedProfileIn( $fname . '-globals' ); /** * @var Language $wgContLang + * @deprecated since 1.32, use the ContentLanguage service directly */ -$wgContLang = Language::factory( $wgLanguageCode ); -$wgContLang->initContLang(); +$wgContLang = MediaWikiServices::getInstance()->getContentLanguage(); // Now that variant lists may be available... $wgRequest->interpolateTitle(); @@ -898,6 +893,7 @@ $wgOut = RequestContext::getMain()->getOutput(); // BackCompat /** * @var Parser $wgParser + * @deprecated since 1.32, use MediaWikiServices::getParser() instead */ $wgParser = new StubObject( 'wgParser', function () { return MediaWikiServices::getInstance()->getParser();