Merge "Add API output skin"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 24 Sep 2014 15:20:41 +0000 (15:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 24 Sep 2014 15:20:41 +0000 (15:20 +0000)
1  2 
includes/AutoLoader.php
includes/Setup.php

diff --combined includes/AutoLoader.php
@@@ -126,7 -126,6 +126,7 @@@ $wgAutoloadLocalClasses = array
        'Message' => 'includes/Message.php',
        'MessageBlobStore' => 'includes/MessageBlobStore.php',
        'MimeMagic' => 'includes/MimeMagic.php',
 +      'MovePage' => 'includes/MovePage.php',
        'MWHookException' => 'includes/Hooks.php',
        'MWHttpRequest' => 'includes/HttpFunctions.php',
        'MWNamespace' => 'includes/MWNamespace.php',
        'ApiQueryAllPages' => 'includes/api/ApiQueryAllPages.php',
        'ApiQueryAllUsers' => 'includes/api/ApiQueryAllUsers.php',
        'ApiQueryBacklinks' => 'includes/api/ApiQueryBacklinks.php',
 +      'ApiQueryBacklinksprop' => 'includes/api/ApiQueryBacklinksprop.php',
        'ApiQueryBase' => 'includes/api/ApiQueryBase.php',
        'ApiQueryBlocks' => 'includes/api/ApiQueryBlocks.php',
        'ApiQueryCategories' => 'includes/api/ApiQueryCategories.php',
        'ApiQueryRandom' => 'includes/api/ApiQueryRandom.php',
        'ApiQueryRecentChanges' => 'includes/api/ApiQueryRecentChanges.php',
        'ApiQueryFileRepoInfo' => 'includes/api/ApiQueryFileRepoInfo.php',
 -      'ApiQueryRedirects' => 'includes/api/ApiQueryRedirects.php',
        'ApiQueryRevisions' => 'includes/api/ApiQueryRevisions.php',
        'ApiQuerySearch' => 'includes/api/ApiQuerySearch.php',
        'ApiQuerySiteinfo' => 'includes/api/ApiQuerySiteinfo.php',
        'ConfigException' => 'includes/config/ConfigException.php',
        'ConfigFactory' => 'includes/config/ConfigFactory.php',
        'GlobalVarConfig' => 'includes/config/GlobalVarConfig.php',
 +      'HashConfig' => 'includes/config/HashConfig.php',
 +      'MultiConfig' => 'includes/config/MultiConfig.php',
        'MutableConfig' => 'includes/config/MutableConfig.php',
  
        # includes/content
        'ResourceLoaderFileModule' => 'includes/resourceloader/ResourceLoaderFileModule.php',
        'ResourceLoaderFilePageModule' => 'includes/resourceloader/ResourceLoaderFilePageModule.php',
        'ResourceLoaderFilePath' => 'includes/resourceloader/ResourceLoaderFilePath.php',
 -      'ResourceLoaderLESSFunctions' => 'includes/resourceloader/ResourceLoaderLESSFunctions.php',
        'ResourceLoaderModule' => 'includes/resourceloader/ResourceLoaderModule.php',
        'ResourceLoaderNoscriptModule' => 'includes/resourceloader/ResourceLoaderNoscriptModule.php',
        'ResourceLoaderSiteModule' => 'includes/resourceloader/ResourceLoaderSiteModule.php',
        'MediaWikiI18N' => 'includes/skins/SkinTemplate.php',
        'QuickTemplate' => 'includes/skins/SkinTemplate.php',
        'Skin' => 'includes/skins/Skin.php',
+       'SkinApi' => 'includes/skins/SkinApi.php',
+       'SkinApiTemplate' => 'includes/skins/SkinApiTemplate.php',
        'SkinException' => 'includes/skins/SkinException.php',
        'SkinFactory' => 'includes/skins/SkinFactory.php',
        'SkinFallback' => 'includes/skins/SkinFallback.php',
        'LoginForm' => 'includes/specials/SpecialUserlogin.php',
        'LonelyPagesPage' => 'includes/specials/SpecialLonelypages.php',
        'LongPagesPage' => 'includes/specials/SpecialLongpages.php',
 +      'MediaStatisticsPage' => 'includes/specials/SpecialMediaStatistics.php',
        'MergeHistoryPager' => 'includes/specials/SpecialMergeHistory.php',
        'MIMEsearchPage' => 'includes/specials/SpecialMIMEsearch.php',
        'MostcategoriesPage' => 'includes/specials/SpecialMostcategories.php',
diff --combined includes/Setup.php
@@@ -77,12 -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 ) {
@@@ -109,7 -106,7 +109,7 @@@ if ( $wgGitInfoCacheDirectory === fals
  if ( $wgRightsIcon ) {
        $wgRightsIcon = str_replace(
                "{$wgStylePath}/common/images/",
 -              "{$wgScriptPath}/assets/licenses/",
 +              "{$wgResourceBasePath}/resources/assets/licenses/",
                $wgRightsIcon
        );
  }
@@@ -136,7 -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";
  }
  
  /**
@@@ -289,8 -286,13 +289,13 @@@ call_user_func( function () use ( $wgVa
        $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 );