diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-12-03 10:06:02 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-12-03 10:06:02 +0000 |
commit | c60c19f81458f6d150202ac9a772dfaf942af355 (patch) | |
tree | 1e6d4baecf7ad66f1d5f4cbb8e91a3fb6bf20611 | |
parent | 066fb4e8e3e911b8504365cf62ce1af15e391628 (diff) | |
download | semanticscuttle-c60c19f81458f6d150202ac9a772dfaf942af355.tar.gz semanticscuttle-c60c19f81458f6d150202ac9a772dfaf942af355.tar.bz2 |
Bug fix: correct ROOT declaration
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@187 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r-- | constants.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/constants.inc.php b/constants.inc.php index 23dcc4a..8078141 100644 --- a/constants.inc.php +++ b/constants.inc.php @@ -13,9 +13,11 @@ if(isset($GLOBALS['debugMode'])) { // Determine the base URL as ROOT if (!isset($GLOBALS['root'])) { $pieces = explode('/', $_SERVER['SCRIPT_NAME']); + $rootTmp = '/'; foreach($pieces as $piece) { - if ($piece != '' && !strstr($piece, '.php')) { + //we eliminate possible sscuttle subfolders (like gsearch for example) + if ($piece != '' && !strstr($piece, '.php') && $piece != 'gsearch') { $rootTmp .= $piece .'/'; } } @@ -24,6 +26,8 @@ if (!isset($GLOBALS['root'])) { } define('ROOT', 'http://'. $_SERVER['HTTP_HOST'] . $rootTmp); +} else { + define('ROOT', $GLOBALS['root']); } // Error codes |