diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-02-28 21:11:16 -0800 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-28 21:11:16 -0800 |
commit | fc44c9a7f456a146a20884c56676baf7343dd923 (patch) | |
tree | bcc572d966709bfa19277eb48c3f2f831d49d8ba /lib/common.php | |
parent | 02ba71b0f186b406071a97c3267603d4863a4b21 (diff) | |
parent | 458c03786735bd3e3b6619b2d20538bd55acd0c6 (diff) |
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'lib/common.php')
-rw-r--r-- | lib/common.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/common.php b/lib/common.php index 4fc749ca0..0fff3af2e 100644 --- a/lib/common.php +++ b/lib/common.php @@ -178,12 +178,25 @@ if (strlen($_path) > 0) { $_config_files[] = INSTALLDIR.'/config.php'; +$_have_a_config = false; + foreach ($_config_files as $_config_file) { if (file_exists($_config_file)) { include_once($_config_file); + $_have_a_config = true; } } +// 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'); |