From 38ac5a7005615af93169d8723d1034ded9be7c85 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 12 Aug 2013 13:14:50 +0200 Subject: [PATCH] Automatic memcache support enabler for config --- lib/installer.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/installer.php b/lib/installer.php index 69ad194829..187bdc172c 100644 --- a/lib/installer.php +++ b/lib/installer.php @@ -440,6 +440,16 @@ abstract class Installer ($this->db['type'] == 'pgsql' ? "\$config['db']['quote_identifiers'] = true;\n\n":''). "\$config['db']['type'] = {$vals['db_type']};\n\n"; + // Auto memcache support detection + $cfg .= ' +foreach(array("Memcache", "Memcached") as $plugin) : + if (class_exists($plugin)) { + addPlugin($plugin); + break; + } +endforeach; +'; + // Normalize line endings for Windows servers $cfg = str_replace("\n", PHP_EOL, $cfg);