Fixed issue with 3.1 were the sort order of all items in the list would be modified if one item is detected to have an sort order of 0

This commit is contained in:
Ed 2013-02-06 19:38:20 -04:00
parent 3e4d5b5259
commit 1dba2a911a
1 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,8 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
$max = $list->Max($this->sortColumn);
if($list->where('"'.$this->sortColumn.'"=0')->Count()>0) {
$list=$list->where('"'.$this->sortColumn.'"=0');
if($list->Count()>0) {
$owner = $gridField->Form->getRecord();
$sortColumn = $this->sortColumn;
$i = 1;