summaryrefslogtreecommitdiff
path: root/lib/common.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-22 15:29:24 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-22 15:29:24 -0700
commit9171f16b730176717b0b9abf84ace10b7a6dddc7 (patch)
tree8cde2c9a47fc22311390e9938f9bdb381bad60e4 /lib/common.php
parente14322672cc24adc27efc2aeaafee60ef03ab650 (diff)
add commandline.inc for parsing
Diffstat (limited to 'lib/common.php')
-rw-r--r--lib/common.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/common.php b/lib/common.php
index a8c7634f6..2327dcb0e 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -269,14 +269,18 @@ if (function_exists('date_default_timezone_set')) {
// server-wide, then vhost-wide, then for a path,
// finally for a dir (usually only need one of the last two).
-$_config_files = array('/etc/laconica/laconica.php',
- '/etc/laconica/'.$_server.'.php');
+if (isset($conffile)) {
+ $_config_files = array($conffile);
+} else {
+ $_config_files = array('/etc/laconica/laconica.php',
+ '/etc/laconica/'.$_server.'.php');
-if (strlen($_path) > 0) {
- $_config_files[] = '/etc/laconica/'.$_server.'_'.$_path.'.php';
-}
+ if (strlen($_path) > 0) {
+ $_config_files[] = '/etc/laconica/'.$_server.'_'.$_path.'.php';
+ }
-$_config_files[] = INSTALLDIR.'/config.php';
+ $_config_files[] = INSTALLDIR.'/config.php';
+}
$_have_a_config = false;