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)

This commit is contained in:
Ralf Becker 2003-03-04 17:13:19 +00:00
parent 48520640c3
commit 9669f27a8c

View File

@ -632,8 +632,11 @@
$referer = get_var('HTTP_REFERER',Array('GLOBAL')); $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)) if (!strstr($url['query'],'menuaction=infolog') || !is_array($vars))
{ {
return $url['path'].($url['query'] ? '?'.$url['query'] : ''); return $url['path'].($url['query'] ? '?'.$url['query'] : '');