Changed order of controller var merging

From AppController -> PluginAppController to
PluginAppConroller -> AppController

Fixes #2420

Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
tigrang 2011-12-28 18:33:01 -08:00 committed by mark_story
parent 339259c841
commit 015f9957be

View file

@ -534,6 +534,18 @@ class Controller extends Object {
$pluginDot = $this->plugin . '.';
}
if ($pluginController && $this->plugin != null) {
$merge = array('components', 'helpers');
$appVars = get_class_vars($pluginController);
if (
($this->uses !== null || $this->uses !== false) &&
is_array($this->uses) && !empty($appVars['uses'])
) {
$this->uses = array_merge($this->uses, array_diff($appVars['uses'], $this->uses));
}
$this->_mergeVars($merge, $pluginController);
}
if (is_subclass_of($this, $this->_mergeParent) || !empty($pluginController)) {
$appVars = get_class_vars($this->_mergeParent);
$uses = $appVars['uses'];
@ -556,18 +568,6 @@ class Controller extends Object {
}
$this->_mergeVars($merge, $this->_mergeParent, true);
}
if ($pluginController && $this->plugin != null) {
$merge = array('components', 'helpers');
$appVars = get_class_vars($pluginController);
if (
($this->uses !== null || $this->uses !== false) &&
is_array($this->uses) && !empty($appVars['uses'])
) {
$this->uses = array_merge($this->uses, array_diff($appVars['uses'], $this->uses));
}
$this->_mergeVars($merge, $pluginController);
}
}
/**