mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#1444 - DataObjectDecorator? Merge Fields HUGE PROBLEM (merged from 2.1.0 branch, r42210)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42918 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5062c955e0
commit
30efb8efc7
@ -22,10 +22,7 @@ abstract class DataObjectDecorator extends Extension {
|
|||||||
|
|
||||||
if($fields) {
|
if($fields) {
|
||||||
foreach($fields as $relationType => $fields) {
|
foreach($fields as $relationType => $fields) {
|
||||||
if(in_array($relationType, array('db', 'has_one', 'indexes',
|
if(in_array($relationType, array('db', 'has_one', 'indexes', 'defaults', 'has_many', 'many_many', 'belongs_many_many', 'many_many_extraFields'))) {
|
||||||
'defaults', 'many_many',
|
|
||||||
'belongs_many_many',
|
|
||||||
'many_many_extraFields'))) {
|
|
||||||
eval("$className::\$$relationType = array_merge((array){$className}::\$$relationType, (array)\$fields);");
|
eval("$className::\$$relationType = array_merge((array){$className}::\$$relationType, (array)\$fields);");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user