mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
4602d76673
commit
68ea832150
1 changed files with 3 additions and 1 deletions
|
@ -375,10 +375,12 @@ class Dispatcher extends Object {
|
||||||
|
|
||||||
foreach($controller->components as $c) {
|
foreach($controller->components as $c) {
|
||||||
if (isset($controller->{$c}) && is_object($controller->{$c}) && is_callable(array($controller->{$c}, 'startup'))) {
|
if (isset($controller->{$c}) && is_object($controller->{$c}) && is_callable(array($controller->{$c}, 'startup'))) {
|
||||||
|
if (!array_key_exists('enabled', get_object_vars($controller->{$c})) || $controller->{$c}->enabled == true) {
|
||||||
$controller->{$c}->startup($controller);
|
$controller->{$c}->startup($controller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns array of GET and POST parameters. GET parameters are taken from given URL.
|
* Returns array of GET and POST parameters. GET parameters are taken from given URL.
|
||||||
|
|
Loading…
Add table
Reference in a new issue