From d4c8f47c17762e4d3d2da52aeba809a70210ead3 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 13 Aug 2013 07:46:04 -0400 Subject: [PATCH] Fixes #753: fixed sorting issue of ActiveDataProvider --- framework/yii/data/ActiveDataProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/data/ActiveDataProvider.php b/framework/yii/data/ActiveDataProvider.php index 63635ab..6dfc9ed 100644 --- a/framework/yii/data/ActiveDataProvider.php +++ b/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); }