mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
updating cache with new component callback handling
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7101 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
394fe24e90
commit
a13232659f
1 changed files with 2 additions and 11 deletions
|
@ -240,7 +240,7 @@ class CacheHelper extends AppHelper {
|
|||
';
|
||||
}
|
||||
|
||||
$file .= '$controller = new ' . $this->controllerName . 'Controller();
|
||||
$file .= '$controller =& new ' . $this->controllerName . 'Controller();
|
||||
$controller->plugin = $this->plugin = \''.$this->plugin.'\';
|
||||
$controller->helpers = $this->helpers = unserialize(\'' . serialize($this->helpers) . '\');
|
||||
$controller->base = $this->base = \'' . $this->base . '\';
|
||||
|
@ -257,16 +257,7 @@ class CacheHelper extends AppHelper {
|
|||
if ($useCallbacks == true) {
|
||||
$file .= '$controller->constructClasses();
|
||||
$controller->beforeFilter();
|
||||
foreach ($controller->components as $c) {
|
||||
$path = preg_split(\'/\/|\./\', $c);
|
||||
$c = $path[count($path) - 1];
|
||||
|
||||
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->Component->startup($controller);';
|
||||
}
|
||||
|
||||
$file .= '
|
||||
|
|
Loading…
Add table
Reference in a new issue