From 5926684aab72265d243142010d9dfa8d642efdb9 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sun, 25 Nov 2012 17:57:39 +0100 Subject: Unify path schema in global constants: paths always end with a /. Keep RCMAIL_CONFIG_DIR for backwards compatibility --- installer/index.php | 2 +- installer/rcube_install.php | 6 +++--- installer/test.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'installer') diff --git a/installer/index.php b/installer/index.php index 40dabc893..7a78736b8 100644 --- a/installer/index.php +++ b/installer/index.php @@ -41,7 +41,7 @@ ini_set('display_errors', 1); define('INSTALL_PATH', realpath(dirname(__FILE__) . '/../').'/'); define('RCUBE_INSTALL_PATH', INSTALL_PATH); -define('RCUBE_CONFIG_DIR', INSTALL_PATH . 'config'); +define('RCUBE_CONFIG_DIR', INSTALL_PATH . 'config/'); $include_path = INSTALL_PATH . 'program/lib' . PATH_SEPARATOR; $include_path .= INSTALL_PATH . 'program' . PATH_SEPARATOR; diff --git a/installer/rcube_install.php b/installer/rcube_install.php index b3208f037..dfd63562d 100644 --- a/installer/rcube_install.php +++ b/installer/rcube_install.php @@ -109,12 +109,12 @@ class rcube_install */ function _load_config($suffix) { - if (is_readable($main_inc = RCUBE_CONFIG_DIR . '/main.inc' . $suffix)) { + if (is_readable($main_inc = RCUBE_CONFIG_DIR . 'main.inc' . $suffix)) { include($main_inc); if (is_array($rcmail_config)) $this->config += $rcmail_config; } - if (is_readable($db_inc = RCUBE_CONFIG_DIR . '/db.inc'. $suffix)) { + if (is_readable($db_inc = RCUBE_CONFIG_DIR . 'db.inc'. $suffix)) { include($db_inc); if (is_array($rcmail_config)) $this->config += $rcmail_config; @@ -149,7 +149,7 @@ class rcube_install */ function create_config($which, $force = false) { - $out = @file_get_contents(RCUBE_CONFIG_DIR . "/{$which}.inc.php.dist"); + $out = @file_get_contents(RCUBE_CONFIG_DIR . $which . '.inc.php.dist'); if (!$out) return '[Warning: could not read the config template file]'; diff --git a/installer/test.php b/installer/test.php index 836ef1365..e266bf05f 100644 --- a/installer/test.php +++ b/installer/test.php @@ -3,8 +3,8 @@

Check config files

config)) { $RCI->pass('main.inc.php'); -- cgit v1.2.3