Skip to content
This repository
Browse code

BUG Allow custom getters in summaryFields() (fixes #7788)

Regression from ca1d38d
  • Loading branch information...
commit f070f971cfd001743b0229085094e0d18a147482 1 parent 82500dd
Ingo Schommer authored

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

  1. 6  model/DataObject.php
6  model/DataObject.php
@@ -3135,7 +3135,6 @@ public function fieldLabel($name) {
3135 3135
 	 * @return array
3136 3136
 	 */
3137 3137
 	public function summaryFields(){
3138  
-
3139 3138
 		$fields = $this->stat('summary_fields');
3140 3139
 
3141 3140
 		// if fields were passed in numeric array,
@@ -3158,8 +3157,9 @@ public function summaryFields(){
3158 3157
 		if(!$fields) $fields['ID'] = 'ID';
3159 3158
 
3160 3159
 		// Localize fields (if possible)
3161  
-		$labels = $this->fieldLabels(false);
3162  
-		$fields = array_intersect_key($labels, $fields);
  3160
+		foreach($this->fieldLabels(false) as $name => $label) {
  3161
+			if(isset($fields[$name])) $fields[$name] = $label;
  3162
+		}
3163 3163
 		
3164 3164
 		return $fields;
3165 3165
 	}

0 notes on commit f070f97

Please sign in to comment.
Something went wrong with that request. Please try again.