]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
automatically handle non-laconica-named databases
authorEvan Prodromou <evan@controlyourself.ca>
Sun, 1 Mar 2009 04:32:31 +0000 (20:32 -0800)
committerEvan Prodromou <evan@controlyourself.ca>
Sun, 1 Mar 2009 04:32:31 +0000 (20:32 -0800)
lib/common.php

index 2298c5f88f32b22e534fc93851835d013cd6ea4d..0fff3af2ea8b23704f97bd693a104b7482f71567 100644 (file)
@@ -187,6 +187,16 @@ foreach ($_config_files as $_config_file) {
     }
 }
 
+// XXX: Throw a conniption if database not installed
+
+// Fixup for laconica.ini
+
+$_db_name = substr($config['db']['database'], strrpos($config['db']['database'], '/') + 1);
+
+if ($_db_name != 'laconica' && !array_key_exists('ini_'.$_db_name, $config['db'])) {
+    $config['db']['ini_'.$_db_name] = INSTALLDIR.'/classes/laconica.ini';
+}
+
 // XXX: how many of these could be auto-loaded on use?
 
 require_once('Validate.php');