Skip to content

Commit

Permalink
FIX: Ensure that columns are unique within a gridfield
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Sep 1, 2014
1 parent 0991477 commit 3644110
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion forms/gridfield/GridFieldDataColumns.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ class GridFieldDataColumns implements GridField_ColumnProvider {
*/
public function augmentColumns($gridField, &$columns) {
$baseColumns = array_keys($this->getDisplayFields($gridField));
foreach($baseColumns as $col) $columns[] = $col;

foreach($baseColumns as $col) {
$columns[] = $col;
}

$columns = array_unique($columns);
}

/**
Expand Down

0 comments on commit 3644110

Please sign in to comment.