Do not use "wgMainCacheType" form variable
name that contains values that cannot be
assigned to $wgMainCacheType
Bug: T116375
Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
'wgRightsIcon',
'wgRightsText',
'wgRightsUrl',
'wgRightsIcon',
'wgRightsText',
'wgRightsUrl',
'wgEnableEmail',
'wgEnableUserEmail',
'wgEnotifUserTalk',
'wgEnableEmail',
'wgEnableUserEmail',
'wgEnotifUserTalk',
'wgLanguageCode', 'wgEnableEmail', 'wgEnableUserEmail', 'wgDiff3',
'wgEnotifUserTalk', 'wgEnotifWatchlist', 'wgEmailAuthentication',
'wgDBtype', 'wgSecretKey', 'wgRightsUrl', 'wgSitename', 'wgRightsIcon',
'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',
),
'wgDBpassword', 'wgUseInstantCommons', 'wgUpgradeKey', 'wgDefaultSkin',
'wgMetaNamespace', 'wgLogo',
),
$serverSetting .= "\$wgServer = \"{$this->values['wgServer']}\";\n";
}
$serverSetting .= "\$wgServer = \"{$this->values['wgServer']}\";\n";
}
- switch ( $this->values['wgMainCacheType'] ) {
+ switch ( $this->values['_MainCacheType'] ) {
case 'anything':
case 'db':
case 'memcached':
case 'accel':
case 'anything':
case 'db':
case 'memcached':
case 'accel':
- $cacheType = 'CACHE_' . strtoupper( $this->values['wgMainCacheType'] );
+ $cacheType = 'CACHE_' . strtoupper( $this->values['_MainCacheType'] );
break;
case 'none':
default:
break;
case 'none':
default:
$caches[] = 'memcached';
// We'll hide/show this on demand when the value changes, see config.js.
$caches[] = 'memcached';
// We'll hide/show this on demand when the value changes, see config.js.
- $cacheval = $this->getVar( 'wgMainCacheType' );
+ $cacheval = $this->getVar( '_MainCacheType' );
if ( !$cacheval ) {
// We need to set a default here; but don't hardcode it
// or we lose it every time we reload the page for validation
if ( !$cacheval ) {
// We need to set a default here; but don't hardcode it
// or we lose it every time we reload the page for validation
// For grep: The following messages are used as the item labels:
// config-cache-none, config-cache-accel, config-cache-memcached
$this->parent->getRadioSet( array(
// For grep: The following messages are used as the item labels:
// config-cache-none, config-cache-accel, config-cache-memcached
$this->parent->getRadioSet( array(
- 'var' => 'wgMainCacheType',
+ 'var' => '_MainCacheType',
'label' => 'config-cache-options',
'itemLabelPrefix' => 'config-cache-',
'values' => $caches,
'label' => 'config-cache-options',
'itemLabelPrefix' => 'config-cache-',
'values' => $caches,
$this->parent->setVarsFromRequest( array( '_RightsProfile', '_LicenseCode',
'wgEnableEmail', 'wgPasswordSender', 'wgEnableUploads', 'wgLogo',
'wgEnableUserEmail', 'wgEnotifUserTalk', 'wgEnotifWatchlist',
$this->parent->setVarsFromRequest( array( '_RightsProfile', '_LicenseCode',
'wgEnableEmail', 'wgPasswordSender', 'wgEnableUploads', 'wgLogo',
'wgEnableUserEmail', 'wgEnotifUserTalk', 'wgEnotifWatchlist',
- 'wgEmailAuthentication', 'wgMainCacheType', '_MemCachedServers',
+ 'wgEmailAuthentication', '_MainCacheType', '_MemCachedServers',
'wgUseInstantCommons', 'wgDefaultSkin' ) );
$retVal = true;
'wgUseInstantCommons', 'wgDefaultSkin' ) );
$retVal = true;
}
$this->parent->setVar( '_Extensions', $extsToInstall );
}
$this->parent->setVar( '_Extensions', $extsToInstall );
- if ( $this->getVar( 'wgMainCacheType' ) == 'memcached' ) {
+ if ( $this->getVar( '_MainCacheType' ) == 'memcached' ) {
$memcServers = explode( "\n", $this->getVar( '_MemCachedServers' ) );
if ( !$memcServers ) {
$this->parent->showError( 'config-memcache-needservers' );
$memcServers = explode( "\n", $this->getVar( '_MemCachedServers' ) );
if ( !$memcServers ) {
$this->parent->showError( 'config-memcache-needservers' );
$( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText );
// Show/Hide memcached servers when needed
$( '#config_wgSitename' ).on( 'keyup change', syncText ).each( syncText );
// Show/Hide memcached servers when needed
- $( 'input[name$="config_wgMainCacheType"]' ).change( function () {
+ $( 'input[name$="config__MainCacheType"]' ).change( function () {
var $memc = $( '#config-memcachewrapper' );
var $memc = $( '#config-memcachewrapper' );
- if ( $( 'input[name$="config_wgMainCacheType"]:checked' ).val() === 'memcached' ) {
+ if ( $( 'input[name$="config__MainCacheType"]:checked' ).val() === 'memcached' ) {
$memc.show( 'slow' );
} else {
$memc.hide( 'slow' );
$memc.show( 'slow' );
} else {
$memc.hide( 'slow' );