From 9171f16b730176717b0b9abf84ace10b7a6dddc7 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 22 Jun 2009 15:29:24 -0700 Subject: add commandline.inc for parsing --- lib/common.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lib/common.php') 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; -- cgit v1.2.3-54-g00ecf