]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Automatic memcache support enabler for config
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 12 Aug 2013 11:14:50 +0000 (13:14 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 12 Aug 2013 11:14:50 +0000 (13:14 +0200)
lib/installer.php

index 69ad194829b4fac7cea3ddd78ecc395f288db0f7..187bdc172c68b62a95fde8e11a5541eea2ae70d6 100644 (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);