From 8b508319abc7aa4d63da4b7c2834f35cdc0d8b36 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 26 Apr 2008 06:52:36 +0000 Subject: [PATCH] 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 --- core/model/DataObjectDecorator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/model/DataObjectDecorator.php b/core/model/DataObjectDecorator.php index 938cd4342..bf8e33990 100755 --- a/core/model/DataObjectDecorator.php +++ b/core/model/DataObjectDecorator.php @@ -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); } } }