return default instead of referer containing "cd=yes", which causes a load of the framework inside the framework

This commit is contained in:
Ralf Becker 2010-06-28 10:51:23 +00:00
parent 186156fced
commit dab86e0dfd

View File

@ -1555,6 +1555,7 @@ class common
* @param string $default='' default to use if referer is not set by webserver or not determinable * @param string $default='' default to use if referer is not set by webserver or not determinable
* @param string $referer='' referer string to use, default ('') use $_SERVER['HTTP_REFERER'] * @param string $referer='' referer string to use, default ('') use $_SERVER['HTTP_REFERER']
* @return string * @return string
* @todo get "real" referer for jDots template
*/ */
static function get_referer($default='',$referer='') static function get_referer($default='',$referer='')
{ {
@ -1572,7 +1573,7 @@ class common
} }
$referer = str_replace('/etemplate/process_exec.php','/index.php',$referer); $referer = str_replace('/etemplate/process_exec.php','/index.php',$referer);
if (empty($referer)) $referer = $default; if (empty($referer) || strpos($referer,'cd=yes') !== false) $referer = $default;
return $referer; return $referer;
} }