diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 3c52df03f2..c8b9fa6a41 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -632,8 +632,11 @@ $referer = get_var('HTTP_REFERER',Array('GLOBAL')); } - $url = parse_url(str_replace($GLOBALS['phpgw_info']['server']['webserver_url'],'',$referer)); - + // make the referer relative to the phpgw-install + $url = parse_url($referer); + $server = parse_url($GLOBALS['phpgw_info']['server']['webserver_url']); + $url['path'] = str_replace($server['path'],'',$url['path']); + if (!strstr($url['query'],'menuaction=infolog') || !is_array($vars)) { return $url['path'].($url['query'] ? '?'.$url['query'] : '');