From 9669f27a8c512fb4f90eb479da8ce0c0bb413142 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 4 Mar 2003 17:13:19 +0000 Subject: [PATCH] fix for gnu-bug #1963: Saveing does not work in InfoLog, happens only if a webserver_url in the configuration includes a host (eg. http://server/phpgroupware) --- infolog/inc/class.uiinfolog.inc.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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'] : '');