Enforcing component callback disabling in Dispatcher (do $this->Component->enabled = false in beforeFilter).

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4305 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2007-01-20 15:29:06 +00:00
parent 4602d76673
commit 68ea832150

View file

@ -375,7 +375,9 @@ class Dispatcher extends Object {
foreach($controller->components as $c) {
if (isset($controller->{$c}) && is_object($controller->{$c}) && is_callable(array($controller->{$c}, 'startup'))) {
$controller->{$c}->startup($controller);
if (!array_key_exists('enabled', get_object_vars($controller->{$c})) || $controller->{$c}->enabled == true) {
$controller->{$c}->startup($controller);
}
}
}
}