Skip to content
Permalink
Browse files

Move error disabling to the error controller.

  • Loading branch information...
markstory committed Jun 19, 2012
1 parent fec6c1c commit f9ddc9c64c15546fa66f90e487a94b81bdaab958
@@ -54,12 +54,15 @@ public function __construct($request = null, $response = null) {
$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 @@ public function initialize(Controller $controller) {
* @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);

0 comments on commit f9ddc9c

Please sign in to comment.
You can’t perform that action at this time.