Reduced LocalFileRestoreBatch::execute deadlocks when doing batch restores
[lhc/web/wiklou.git] / includes / Setup.php
index 78a41d5..743936e 100644 (file)
@@ -77,9 +77,12 @@ if ( $wgStyleDirectory === false ) {
 if ( $wgExtensionAssetsPath === false ) {
        $wgExtensionAssetsPath = "$wgScriptPath/extensions";
 }
+if ( $wgResourceBasePath === null ) {
+       $wgResourceBasePath = $wgScriptPath;
+}
 
 if ( $wgLogo === false ) {
-       $wgLogo = "$wgStylePath/common/images/wiki.png";
+       $wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
 }
 
 if ( $wgUploadPath === false ) {
@@ -106,7 +109,7 @@ if ( $wgGitInfoCacheDirectory === false && $wgCacheDirectory !== false ) {
 if ( $wgRightsIcon ) {
        $wgRightsIcon = str_replace(
                "{$wgStylePath}/common/images/",
-               "{$wgScriptPath}/assets/licenses/",
+               "{$wgResourceBasePath}/resources/assets/licenses/",
                $wgRightsIcon
        );
 }
@@ -133,7 +136,7 @@ if ( isset( $wgFooterIcons['poweredby'] )
        && $wgFooterIcons['poweredby']['mediawiki']['src'] === null
 ) {
        $wgFooterIcons['poweredby']['mediawiki']['src'] =
-               "$wgScriptPath/assets/poweredby_mediawiki_88x31.png";
+               "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png";
 }
 
 /**
@@ -286,8 +289,13 @@ call_user_func( function () use ( $wgValidSkinNames ) {
        $factory->register( 'fallback', 'Fallback', function () {
                return new SkinFallback;
        } );
+       // Register a hidden skin for api output
+       $factory->register( 'apioutput', 'ApiOutput', function () {
+               return new SkinApi;
+       } );
 } );
 $wgSkipSkins[] = 'fallback';
+$wgSkipSkins[] = 'apioutput';
 
 if ( $wgLocalInterwiki ) {
        array_unshift( $wgLocalInterwikis, $wgLocalInterwiki );