Merge pull request #3448 from dereuromark/master-controller

Controller::referer() and local URL
This commit is contained in:
José Lorenzo Rodríguez 2014-05-07 22:42:28 +02:00
commit 751d2d8f2d
2 changed files with 2 additions and 2 deletions

View file

@ -970,7 +970,7 @@ class Controller extends Object implements CakeEventListener {
$referer = $this->request->referer($local);
if ($referer === '/' && $default) {
return Router::url($default, true);
return Router::url($default, !$local);
}
return $referer;
}

View file

@ -938,7 +938,7 @@ class AuthComponentTest extends CakeTestCase {
array($CakeRequest, $CakeResponse)
);
$expected = Router::url($this->Auth->loginRedirect, true);
$expected = Router::url($this->Auth->loginRedirect);
$Controller->expects($this->once())
->method('redirect')
->with($this->equalTo($expected));