HTMLCheckMatrix: Treat row/column labels as HTML in OOUI mode
[lhc/web/wiklou.git] / includes / Setup.php
index 41d5945..43bc2d8 100644 (file)
@@ -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();