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()
{
if ($this->_sort === null) {
$this->_sort = new Sort;
if ($this->id !== null) {
$this->_sort->pageVar = $this->id . '-sort';
}
$this->setSort(array());
}
return $this->_sort;
}

Loading…
Cancel
Save