mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
made get_referer work with $phpgw_info['server']['webserver_url'] like 'http:/domain/path'
(still works with '/path' too)
This commit is contained in:
parent
e356f7ba38
commit
7f4ab3a98e
@ -199,12 +199,16 @@
|
||||
if (!$referer)
|
||||
$referer = $HTTP_REFERER;
|
||||
|
||||
$url = parse_url($referer);
|
||||
$referer = str_replace($phpgw_info['server']['webserver_url'],'',
|
||||
$url['path']);
|
||||
//echo "<p>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 "<p>referer: $HTTP_REFERER --> $referer</p>";
|
||||
|
||||
//echo " --> $referer</p>";
|
||||
|
||||
return $referer;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user