From: Mikael Nordfeldth Date: Mon, 12 Aug 2013 11:14:50 +0000 (+0200) Subject: Automatic memcache support enabler for config X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=38ac5a7005615af93169d8723d1034ded9be7c85;p=quix0rs-gnu-social.git Automatic memcache support enabler for config --- 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);