Skip to content

Commit

Permalink
BUG Localize DataObject->summaryFields()
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Aug 9, 2012
1 parent 77d939f commit ca1d38d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions model/DataObject.php
Expand Up @@ -3156,6 +3156,10 @@ public function summaryFields(){

// Final fail-over, just list ID field
if(!$fields) $fields['ID'] = 'ID';

// Localize fields (if possible)
$labels = $this->fieldLabels(false);
$fields = array_intersect_key($labels, $fields);

return $fields;
}
Expand Down

1 comment on commit ca1d38d

@cam-findlay
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have found that this Localization causes problems with using DataObjects in modeladmin (unless this has been fixed in later commits?)

If the summary fields uses an object method as one of the columns on the modeladmin grid field all the fields break see http://open.silverstripe.org/ticket/7788 for screenshot.

Please sign in to comment.