Automatic memcache support enabler for config

This commit is contained in:
Mikael Nordfeldth 2013-08-12 13:14:50 +02:00
parent 20bad68845
commit 38ac5a7005
1 changed files with 10 additions and 0 deletions

View File

@ -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);