Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

Regression from ca1d38d
  • Loading branch information...
commit f070f971cfd001743b0229085094e0d18a147482 1 parent 82500dd
@chillu chillu authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 model/DataObject.php
View
6 model/DataObject.php
@@ -3135,7 +3135,6 @@ public function fieldLabel($name) {
* @return array
*/
public function summaryFields(){
-
$fields = $this->stat('summary_fields');
// if fields were passed in numeric array,
@@ -3158,8 +3157,9 @@ public function summaryFields(){
if(!$fields) $fields['ID'] = 'ID';
// Localize fields (if possible)
- $labels = $this->fieldLabels(false);
- $fields = array_intersect_key($labels, $fields);
+ foreach($this->fieldLabels(false) as $name => $label) {
+ if(isset($fields[$name])) $fields[$name] = $label;
+ }
return $fields;
}
Please sign in to comment.
Something went wrong with that request. Please try again.