mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-01 23:51:12 +08:00
Fixes #753: fixed sorting issue of ActiveDataProvider
This commit is contained in:
@@ -153,7 +153,7 @@ class ActiveDataProvider extends DataProvider
|
|||||||
$this->query->limit($pagination->getLimit())->offset($pagination->getOffset());
|
$this->query->limit($pagination->getLimit())->offset($pagination->getOffset());
|
||||||
}
|
}
|
||||||
if (($sort = $this->getSort()) !== false) {
|
if (($sort = $this->getSort()) !== false) {
|
||||||
$this->query->orderBy($sort->getOrders());
|
$this->query->addOrderBy($sort->getOrders());
|
||||||
}
|
}
|
||||||
$this->_models = $this->query->all($this->db);
|
$this->_models = $this->query->all($this->db);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user