Merge "Installer: use _MainCacheType form variable"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 26 Oct 2015 17:32:52 +0000 (17:32 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 26 Oct 2015 17:32:52 +0000 (17:32 +0000)
1  2 
includes/installer/Installer.php
includes/installer/LocalSettingsGenerator.php

@@@ -164,7 -164,6 +164,6 @@@ abstract class Installer 
                'wgRightsIcon',
                'wgRightsText',
                'wgRightsUrl',
-               'wgMainCacheType',
                'wgEnableEmail',
                'wgEnableUserEmail',
                'wgEnotifUserTalk',
                return Status::newGood();
        }
  
 -      /**
 -       * Exports all wg* variables stored by the installer into global scope.
 -       */
 -      public function exportVars() {
 -              foreach ( $this->settings as $name => $value ) {
 -                      if ( substr( $name, 0, 2 ) == 'wg' ) {
 -                              $GLOBALS[$name] = $value;
 -                      }
 -              }
 -      }
 -
        /**
         * Environment check for DB types.
         * @return bool
@@@ -62,8 -62,8 +62,8 @@@ class LocalSettingsGenerator 
                                'wgLanguageCode', 'wgEnableEmail', 'wgEnableUserEmail', 'wgDiff3',
                                'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication',
                                'wgDBtype', 'wgSecretKey', 'wgRightsUrl', 'wgSitename', 'wgRightsIcon',
-                               'wgRightsText', 'wgMainCacheType', 'wgEnableUploads',
-                               'wgMainCacheType', '_MemCachedServers', 'wgDBserver', 'wgDBuser',
+                               'wgRightsText', '_MainCacheType', 'wgEnableUploads',
+                               '_MemCachedServers', 'wgDBserver', 'wgDBuser',
                                'wgDBpassword', 'wgUseInstantCommons', 'wgUpgradeKey', 'wgDefaultSkin',
                                'wgMetaNamespace', 'wgLogo',
                        ),
                $serverSetting = "";
                if ( array_key_exists( 'wgServer', $this->values ) && $this->values['wgServer'] !== null ) {
                        $serverSetting = "\n## The protocol and server name to use in fully-qualified URLs\n";
 -                      $serverSetting .= "\$wgServer = \"{$this->values['wgServer']}\";\n";
 +                      $serverSetting .= "\$wgServer = \"{$this->values['wgServer']}\";";
                }
  
-               switch ( $this->values['wgMainCacheType'] ) {
+               switch ( $this->values['_MainCacheType'] ) {
                        case 'anything':
                        case 'db':
                        case 'memcached':
                        case 'accel':
-                               $cacheType = 'CACHE_' . strtoupper( $this->values['wgMainCacheType'] );
+                               $cacheType = 'CACHE_' . strtoupper( $this->values['_MainCacheType'] );
                                break;
                        case 'none':
                        default:
@@@ -334,10 -334,7 +334,10 @@@ if ( !defined( 'MEDIAWIKI' ) ) 
  \$wgScriptPath = \"{$this->values['wgScriptPath']}\";
  ${serverSetting}
  
 -## The relative URL path to the logo.  Make sure you change this from the default,
 +## The URL path to static resources (images, scripts, etc.)
 +\$wgResourceBasePath = \$wgScriptPath;
 +
 +## The URL path to the logo.  Make sure you change this from the default,
  ## or else you'll overwrite your logo when you upgrade!
  \$wgLogo = \"{$this->values['wgLogo']}\";