From 7f4ab3a98e0b36ee8520b1a68f3ebfe120ab587d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 14 Jul 2001 09:14:28 +0000 Subject: [PATCH] made get_referer work with $phpgw_info['server']['webserver_url'] like 'http:/domain/path' (still works with '/path' too) --- infolog/inc/class.uiinfolog.inc.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 8d39ee3fda..e4c30e6fd3 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -199,12 +199,16 @@ if (!$referer) $referer = $HTTP_REFERER; - $url = parse_url($referer); - $referer = str_replace($phpgw_info['server']['webserver_url'],'', - $url['path']); + //echo "

get_referer: referer=$referer, webserver_url=".$phpgw_info['server']['webserver_url']; + + $url = parse_url(str_replace($phpgw_info['server']['webserver_url'],'', + $referer)); + $referer = $url['path']; + if ($url['query']) $referer .= '?'.$url['query']; - //echo "

referer: $HTTP_REFERER --> $referer

"; + + //echo " --> $referer

"; return $referer; }