From 30f5025431db3f5ecb2406861d5d18aa96427d93 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 5 Aug 2011 08:00:58 +0000 Subject: [PATCH] * API fix webserver_url of just a domain eg. http://domain.com gives PHP Warning empty delimiter ... --- phpgwapi/inc/class.egw.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.egw.inc.php b/phpgwapi/inc/class.egw.inc.php index 17dd0bb217..955efc528b 100644 --- a/phpgwapi/inc/class.egw.inc.php +++ b/phpgwapi/inc/class.egw.inc.php @@ -310,11 +310,11 @@ class egw extends egw_minimal { //echo "

account_callback='$account_callback', account=".print_r($account,true).", sessionid=$sessionid

\n"; exit; // we forward to the same place after the re-login - if ($GLOBALS['egw_info']['server']['webserver_url'] && $GLOBALS['egw_info']['server']['webserver_url'] != '/') + if ($GLOBALS['egw_info']['server']['webserver_url'] && $GLOBALS['egw_info']['server']['webserver_url'] != '/' && + ($webserver_path = parse_url($GLOBALS['egw_info']['server']['webserver_url'],PHP_URL_PATH)) && $webserver_path != '/') { // we have to use only path component, to cope with domains like http://egroupware.domain.com and /egroupware - list(,$relpath) = explode(parse_url($GLOBALS['egw_info']['server']['webserver_url'],PHP_URL_PATH), - parse_url($_SERVER['PHP_SELF'],PHP_URL_PATH),2); + list(,$relpath) = explode($webserver_path,parse_url($_SERVER['PHP_SELF'],PHP_URL_PATH),2); } else // the webserver-url is empty or just a slash '/' (eGW is installed in the docroot and no domain given) {