Move error disabling to the error controller.

This commit is contained in:
mark_story 2012-06-18 22:08:39 -04:00
parent fec6c1c6cb
commit f9ddc9c64c
3 changed files with 6 additions and 11 deletions

View file

@ -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);
}
}
/**

View file

@ -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']);

View file

@ -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);