Properly detect if CACHE_ACCEL is available in the installer
[lhc/web/wiklou.git] / includes / installer / LocalSettingsGenerator.php
index dde4daa..38019e4 100644 (file)
@@ -65,12 +65,11 @@ class LocalSettingsGenerator {
                                '_MemCachedServers', 'wgDBserver', 'wgDBuser',
                                'wgDBpassword', 'wgUseInstantCommons', 'wgUpgradeKey', 'wgDefaultSkin',
                                'wgMetaNamespace', 'wgLogo', 'wgAuthenticationTokenVersion', 'wgPingback',
-                               '_Caches',
                        ],
                        $db->getGlobalNames()
                );
 
-               $unescaped = [ 'wgRightsIcon', 'wgLogo' ];
+               $unescaped = [ 'wgRightsIcon', 'wgLogo', '_Caches' ];
                $boolItems = [
                        'wgEnableEmail', 'wgEnableUserEmail', 'wgEnotifUserTalk',
                        'wgEnotifWatchlist', 'wgEmailAuthentication', 'wgEnableUploads', 'wgUseInstantCommons',
@@ -294,17 +293,11 @@ class LocalSettingsGenerator {
                        case 'db':
                        case 'memcached':
                        case 'accel':
-                       case 'none':
                                $cacheType = 'CACHE_' . strtoupper( $this->values['_MainCacheType'] );
                                break;
+                       case 'none':
                        default:
-                               // 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';
-                               }
+                               $cacheType = 'CACHE_NONE';
                }
 
                $mcservers = $this->buildMemcachedServerList();