From b7948e48406f21a059431a619c901b3cd88a8ec5 Mon Sep 17 00:00:00 2001 From: Jin Hu Date: Thu, 26 Sep 2013 23:35:02 +0800 Subject: [PATCH] Removed unnecessary lines --- framework/yii/data/ActiveDataProvider.php | 1 - framework/yii/data/ArrayDataProvider.php | 1 - 2 files changed, 2 deletions(-) diff --git a/framework/yii/data/ActiveDataProvider.php b/framework/yii/data/ActiveDataProvider.php index aaf71b2..2fe0efb 100644 --- a/framework/yii/data/ActiveDataProvider.php +++ b/framework/yii/data/ActiveDataProvider.php @@ -156,7 +156,6 @@ class ActiveDataProvider extends DataProvider throw new InvalidConfigException('The "query" property must be an instance of Query or its subclass.'); } if (($pagination = $this->getPagination()) !== false) { - $pagination->totalCount = $this->getTotalCount(); $this->query->limit($pagination->getLimit())->offset($pagination->getOffset()); } if (($sort = $this->getSort()) !== false) { diff --git a/framework/yii/data/ArrayDataProvider.php b/framework/yii/data/ArrayDataProvider.php index d6eaca7..9534803 100644 --- a/framework/yii/data/ArrayDataProvider.php +++ b/framework/yii/data/ArrayDataProvider.php @@ -114,7 +114,6 @@ class ArrayDataProvider extends DataProvider } if (($pagination = $this->getPagination()) !== false) { - $pagination->totalCount = $this->getTotalCount(); $models = array_slice($models, $pagination->getOffset(), $pagination->getLimit()); }