mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Move error disabling to the error controller.
This commit is contained in:
parent
fec6c1c6cb
commit
f9ddc9c64c
3 changed files with 6 additions and 11 deletions
|
@ -54,12 +54,15 @@ class CakeErrorController extends AppController {
|
|||
$this->components[] = 'RequestHandler';
|
||||
}
|
||||
$this->constructClasses();
|
||||
if ($this->Components->enabled('Auth')) {
|
||||
$this->Components->disable('Auth');
|
||||
}
|
||||
if ($this->Components->enabled('Security')) {
|
||||
$this->Components->disable('Security');
|
||||
}
|
||||
$this->startupProcess();
|
||||
|
||||
$this->_set(array('cacheAction' => false, 'viewPath' => 'Errors'));
|
||||
if (isset($this->RequestHandler)) {
|
||||
$this->RequestHandler->startup($this);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -264,10 +264,6 @@ class AuthComponent extends Component {
|
|||
* @return boolean
|
||||
*/
|
||||
public function startup(Controller $controller) {
|
||||
if ($controller->name == 'CakeError') {
|
||||
return true;
|
||||
}
|
||||
|
||||
$methods = array_flip(array_map('strtolower', $controller->methods));
|
||||
$action = strtolower($controller->request->params['action']);
|
||||
|
||||
|
|
|
@ -205,10 +205,6 @@ class SecurityComponent extends Component {
|
|||
* @return void
|
||||
*/
|
||||
public function startup(Controller $controller) {
|
||||
if ($controller->name == 'CakeError') {
|
||||
return true;
|
||||
}
|
||||
|
||||
$this->request = $controller->request;
|
||||
$this->_action = $this->request->params['action'];
|
||||
$this->_methodsRequired($controller);
|
||||
|
|
Loading…
Reference in a new issue