Skip to content
This repository
Browse code

BUG Localize DataObject->summaryFields()

  • Loading branch information...
commit ca1d38dffdb7e9657aafaf070c2d8de2c88f8208 1 parent 77d939f
Ingo Schommer authored August 10, 2012

Showing 1 changed file with 4 additions and 0 deletions. Show diff stats Hide diff stats

  1. 4  model/DataObject.php
4  model/DataObject.php
@@ -3156,6 +3156,10 @@ public function summaryFields(){
3156 3156
 		
3157 3157
 		// Final fail-over, just list ID field
3158 3158
 		if(!$fields) $fields['ID'] = 'ID';
  3159
+
  3160
+		// Localize fields (if possible)
  3161
+		$labels = $this->fieldLabels(false);
  3162
+		$fields = array_intersect_key($labels, $fields);
3159 3163
 		
3160 3164
 		return $fields;
3161 3165
 	}

1 note on commit ca1d38d

cam-findlay

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.
Something went wrong with that request. Please try again.