Skip to content

Commit

Permalink
Merge pull request #85 from pief/master
Browse files Browse the repository at this point in the history
GridFieldOrderableRows: Prefix sort field with table name when sorting
  • Loading branch information
nyeholt committed Feb 26, 2015
2 parents 4855ac5 + ea637b0 commit ad55ced
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/GridFieldOrderableRows.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function getManipulatedData(GridField $grid, SS_List $list) {
$sortterm = $this->extraSortFields.', ';
}
}
$sortterm .= $this->getSortField();
$sortterm .= $this->getSortTable($list).'.'.$this->getSortField();
return $list->sort($sortterm);
} else {
return $list;
Expand Down Expand Up @@ -226,7 +226,7 @@ public function handleReorder($grid, $request) {
$sortterm = $this->extraSortFields.', ';
}
}
$sortterm .= $field;
$sortterm .= $this->getSortTable($list).'.'.$field;
$items = $list->filter('ID', $ids)->sort($sortterm);

// Ensure that each provided ID corresponded to an actual object.
Expand Down

0 comments on commit ad55ced

Please sign in to comment.