Removed unnecessary lines

This commit is contained in:
Jin Hu
2013-09-26 23:35:02 +08:00
parent d9b256d734
commit b7948e4840
2 changed files with 0 additions and 2 deletions

View File

@ -156,7 +156,6 @@ class ActiveDataProvider extends DataProvider
throw new InvalidConfigException('The "query" property must be an instance of Query or its subclass.'); throw new InvalidConfigException('The "query" property must be an instance of Query or its subclass.');
} }
if (($pagination = $this->getPagination()) !== false) { if (($pagination = $this->getPagination()) !== false) {
$pagination->totalCount = $this->getTotalCount();
$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) {

View File

@ -114,7 +114,6 @@ class ArrayDataProvider extends DataProvider
} }
if (($pagination = $this->getPagination()) !== false) { if (($pagination = $this->getPagination()) !== false) {
$pagination->totalCount = $this->getTotalCount();
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit()); $models = array_slice($models, $pagination->getOffset(), $pagination->getLimit());
} }