Fixing merging of actsAs and _findMethods from PluginAppModel classes. Adding test cases and necessary test classes

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7875 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2008-11-14 20:24:27 +00:00
parent b43128c809
commit 6806b895cb
3 changed files with 99 additions and 5 deletions

View file

@ -379,6 +379,15 @@ class Model extends Overloadable {
if ($this->actsAs !== null || $this->actsAs !== false) {
$merge[] = 'actsAs';
}
$parentClass = get_parent_class($this);
if (strtolower($parentClass) !== 'appmodel') {
$parentVars = get_class_vars($parentClass);
foreach ($merge as $var) {
if (isset($parentVars[$var]) && !empty($parentVars[$var])) {
$appVars[$var] = Set::merge($appVars[$var], $parentVars[$var]);
}
}
}
foreach ($merge as $var) {
if (isset($appVars[$var]) && !empty($appVars[$var]) && is_array($this->{$var})) {