mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
mlanthaler: Bugfix: Indexes and defaults were not supported in DataObjectDecorators?.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41973 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9b75ec925a
commit
9af317a264
@ -19,7 +19,10 @@ abstract class DataObjectDecorator extends Extension {
|
||||
$className = $this->owner->class;
|
||||
if($fields) {
|
||||
foreach($fields as $relationType => $fields) {
|
||||
if(in_array($relationType, array('db','has_one','many_many','belongs_many_many','many_many_extraFields'))) {
|
||||
if(in_array($relationType, array('db', 'has_one', 'indexes',
|
||||
'defaults', 'many_many',
|
||||
'belongs_many_many',
|
||||
'many_many_extraFields'))) {
|
||||
eval("$className::\$$relationType = array_merge((array){$className}::\$$relationType, (array)\$fields);");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user