mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: not all decorators has a summary_fields defined, so the code need to deal with this.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61975 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
770bdfa42b
commit
66b6a32c8d
@ -114,14 +114,18 @@ abstract class DataObjectDecorator extends Extension {
|
||||
*/
|
||||
function updateSummaryFields(&$fields){
|
||||
$extra_fields = $this->extraDBFields();
|
||||
$summary_fields = $extra_fields['summary_fields'];
|
||||
if($summary_fields)$fields = array_merge($fields, $summary_fields);
|
||||
if(isset($extra_fields['summary_fields'])){
|
||||
$summary_fields = $extra_fields['summary_fields'];
|
||||
if($summary_fields) $fields = array_merge($fields, $summary_fields);
|
||||
}
|
||||
}
|
||||
|
||||
function updateSummaryFieldsExcludeExtra(&$fields){
|
||||
$extra_fields = $this->extraDBFields();
|
||||
$summary_fields = $extra_fields['summary_fields'];
|
||||
if($summary_fields)$fields = array_merge($fields, $summary_fields);
|
||||
if(isset($extra_fields['summary_fields'])){
|
||||
$summary_fields = $extra_fields['summary_fields'];
|
||||
if($summary_fields)$fields = array_merge($fields, $summary_fields);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user