diff options
author | thomascube <thomas@roundcube.net> | 2008-09-19 18:26:34 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-09-19 18:26:34 +0000 |
commit | bba657e64ff3334ba2f64e88e977a6dc107d682d (patch) | |
tree | c09b64f5a585914a43748ee19167f7b4bf0134a5 /program/include | |
parent | ddd894dbe86c678076b51fc10a9ef8a655f29d68 (diff) |
Made config files location configurable (#1485215)
Diffstat (limited to 'program/include')
-rwxr-xr-x | program/include/iniset.php | 2 | ||||
-rw-r--r-- | program/include/rcmail.php | 2 | ||||
-rw-r--r-- | program/include/rcube_config.php | 8 |
3 files changed, 7 insertions, 5 deletions
diff --git a/program/include/iniset.php b/program/include/iniset.php index 5dacf8552..20fe27996 100755 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -30,6 +30,8 @@ if (!defined('INSTALL_PATH')) { define('INSTALL_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/'); } +define('RCMAIL_CONFIG_DIR', INSTALL_PATH . 'config'); + // make sure path_separator is defined if (!defined('PATH_SEPARATOR')) { define('PATH_SEPARATOR', (eregi('win', PHP_OS) ? ';' : ':')); diff --git a/program/include/rcmail.php b/program/include/rcmail.php index ac328ebb7..12270f077 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -460,7 +460,7 @@ class rcmail raise_error(array( 'code' => 600, 'type' => 'php', - 'file' => "config/main.inc.php", + 'file' => RCMAIL_CONFIG_DIR."/main.inc.php", 'message' => "Acces denied for new user $username. 'auto_create_user' is disabled" ), true, false); } diff --git a/program/include/rcube_config.php b/program/include/rcube_config.php index 98e688d02..c3b0c1832 100644 --- a/program/include/rcube_config.php +++ b/program/include/rcube_config.php @@ -51,13 +51,13 @@ class rcube_config ob_start(); // load main config file - if (include(INSTALL_PATH . 'config/main.inc.php')) + if (include(RCMAIL_CONFIG_DIR . '/main.inc.php')) $this->prop = (array)$rcmail_config; else $this->errors[] = 'main.inc.php was not found.'; // load database config - if (include(INSTALL_PATH . 'config/db.inc.php')) + if (include(RCMAIL_CONFIG_DIR . '/db.inc.php')) $this->prop += (array)$rcmail_config; else $this->errors[] = 'db.inc.php was not found.'; @@ -119,8 +119,8 @@ class rcube_config $fname = preg_replace('/[^a-z0-9\.\-_]/i', '', $_SERVER['HTTP_HOST']) . '.inc.php'; } - if ($fname && is_file(INSTALL_PATH . 'config/' . $fname)) { - include(INSTALL_PATH . 'config/' . $fname); + if ($fname && is_file(RCMAIL_CONFIG_DIR . '/' . $fname)) { + include(RCMAIL_CONFIG_DIR . '/' . $fname); $this->prop = array_merge($this->prop, (array)$rcmail_config); } } |