Skip to content

Commit

Permalink
FIX Swap DataList code to SS_List
Browse files Browse the repository at this point in the history
And remove a reference to a DataList method to rely on the GridField method
instead
  • Loading branch information
Marcus Nyeholt committed Oct 12, 2016
1 parent 50ffec5 commit d722881
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 @@ -143,7 +143,7 @@ public function setReorderColumnNumber($colno) {
* @param DataList $list
* @return string
*/
public function getSortTable(DataList $list) {
public function getSortTable(SS_List $list) {
$field = $this->getSortField();

if($list instanceof ManyManyList) {
Expand Down Expand Up @@ -219,7 +219,7 @@ public function getColumnAttributes($grid, $record, $col) {
}

public function getColumnMetadata($grid, $col) {
if ($fieldLabels = singleton($grid->list->dataClass)->fieldLabels()) {
if ($fieldLabels = singleton($grid->getModelClass())->fieldLabels()) {
return array('title' => isset($fieldLabels['Reorder']) ? $fieldLabels['Reorder'] : '');
}

Expand Down

1 comment on commit d722881

@kinglozzer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance of a new tag? Thanks!

Please sign in to comment.