Browse Source

fix dataProvider getSort()

correct creation of new Sort object if none is there
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
c23725aca0
  1. 5
      framework/yii/data/DataProvider.php

5
framework/yii/data/DataProvider.php

@ -80,10 +80,7 @@ abstract class DataProvider extends Component implements IDataProvider
public function getSort() public function getSort()
{ {
if ($this->_sort === null) { if ($this->_sort === null) {
$this->_sort = new Sort; $this->setSort(array());
if ($this->id !== null) {
$this->_sort->pageVar = $this->id . '-sort';
}
} }
return $this->_sort; return $this->_sort;
} }

Loading…
Cancel
Save