Browse Source

Fixes #753: fixed sorting issue of ActiveDataProvider

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
d4c8f47c17
  1. 2
      framework/yii/data/ActiveDataProvider.php

2
framework/yii/data/ActiveDataProvider.php

@ -153,7 +153,7 @@ class ActiveDataProvider extends DataProvider
$this->query->limit($pagination->getLimit())->offset($pagination->getOffset());
}
if (($sort = $this->getSort()) !== false) {
$this->query->orderBy($sort->getOrders());
$this->query->addOrderBy($sort->getOrders());
}
$this->_models = $this->query->all($this->db);
}

Loading…
Cancel
Save