Merged revisions 52448 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r52448 | sminnee | 2008-04-10 13:50:28 +1200 (Thu, 10 Apr 2008) | 1 line
  
  #2387 - Fields specified in DataObjectDecor not saved in some cases
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53518 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-04-26 06:52:36 +00:00
parent 739bda485f
commit 8b508319ab

View File

@ -47,7 +47,9 @@ abstract class DataObjectDecorator extends Extension {
foreach($fields as $relationType => $fields) {
if(in_array($relationType, self::$decoratable_statics)) {
eval("$className::\$$relationType = array_merge((array){$className}::\$$relationType, (array)\$fields);");
$this->owner->set_stat($relationType, eval("return $className::\$$relationType;"));
}
$this->owner->set_uninherited('fieldExists', null);
}
}
}