mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
fix for Controller::referer
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5528 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5c48a926e7
commit
1e56828522
1 changed files with 2 additions and 3 deletions
|
@ -675,9 +675,8 @@ class Controller extends Object {
|
|||
*/
|
||||
function referer($default = null, $local = false) {
|
||||
$ref = env('HTTP_REFERER');
|
||||
$base = FULL_BASE_URL . $this->webroot;
|
||||
|
||||
if ($ref != null && defined('FULL_BASE_URL')) {
|
||||
if (!empty($ref) && defined('FULL_BASE_URL')) {
|
||||
$base = FULL_BASE_URL . $this->webroot;
|
||||
if (strpos($ref, $base) === 0) {
|
||||
return substr($ref, strlen($base) - 1);
|
||||
} elseif (!$local) {
|
||||
|
|
Loading…
Add table
Reference in a new issue