FIX: Ensure that columns are unique within a gridfield

This commit is contained in:
Will Rossiter 2014-09-01 21:50:36 +12:00
parent 0991477e5a
commit 3644110349

View File

@ -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);
}
/**