From a66cb427895f8c5b805c6b74a7daa2c394b756f1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 12 Nov 2010 09:13:54 +0000 Subject: [PATCH] fixed not always working redirect after login: we have to use only path component, to cope with domains like http://egroupware.domain.com and /egroupware --- phpgwapi/inc/class.egw.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.egw.inc.php b/phpgwapi/inc/class.egw.inc.php index 25851035b4..d55d6d6b92 100644 --- a/phpgwapi/inc/class.egw.inc.php +++ b/phpgwapi/inc/class.egw.inc.php @@ -312,7 +312,9 @@ class egw extends egw_minimal // we forward to the same place after the re-login if ($GLOBALS['egw_info']['server']['webserver_url'] && $GLOBALS['egw_info']['server']['webserver_url'] != '/') { - list(,$relpath) = explode($GLOBALS['egw_info']['server']['webserver_url'],$_SERVER['PHP_SELF'],2); + // 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); } else // the webserver-url is empty or just a slash '/' (eGW is installed in the docroot and no domain given) {