From 1fec847c6b366ab21bb215b94837a186545096f4 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Wed, 15 Mar 2017 06:35:53 +0000 Subject: [PATCH] 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 b3dc2fedc5e35015f9c7 Bug: T160495 Change-Id: Icaa2ca4e8eb63254142e837d2a47b6023a8ea0a2 --- includes/installer/LocalSettingsGenerator.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/installer/LocalSettingsGenerator.php b/includes/installer/LocalSettingsGenerator.php index 697188ef08..dde4daa305 100644 --- a/includes/installer/LocalSettingsGenerator.php +++ b/includes/installer/LocalSettingsGenerator.php @@ -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(); -- 2.20.1