Default to CACHE_ACCEL if user skips advanced settings

In the event user skips advanced settings in the installer, and
CACHE_ACCEL is available, we should default to it. This is already
the default in the event the user goes to advanced settings
since b3dc2fedc5

Bug: T160495
Change-Id: Icaa2ca4e8eb63254142e837d2a47b6023a8ea0a2
This commit is contained in:
Brian Wolff 2017-03-15 06:35:53 +00:00
parent 8f48467d26
commit 1fec847c6b

View file

@ -65,6 +65,7 @@ class LocalSettingsGenerator {
'_MemCachedServers', 'wgDBserver', 'wgDBuser',
'wgDBpassword', 'wgUseInstantCommons', 'wgUpgradeKey', 'wgDefaultSkin',
'wgMetaNamespace', 'wgLogo', 'wgAuthenticationTokenVersion', 'wgPingback',
'_Caches',
],
$db->getGlobalNames()
);
@ -293,11 +294,17 @@ class LocalSettingsGenerator {
case 'db':
case 'memcached':
case 'accel':
case 'none':
$cacheType = 'CACHE_' . strtoupper( $this->values['_MainCacheType'] );
break;
case 'none':
default:
$cacheType = 'CACHE_NONE';
// If the user skipped the options page,
// default to CACHE_ACCEL if available
if ( count( $this->values['_Caches'] ) ) {
$cacheType = 'CACHE_ACCEL';
} else {
$cacheType = 'CACHE_NONE';
}
}
$mcservers = $this->buildMemcachedServerList();