Commit b7948e48 by Jin Hu

Removed unnecessary lines

parent d9b256d7
...@@ -156,7 +156,6 @@ class ActiveDataProvider extends DataProvider ...@@ -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) {
......
...@@ -114,7 +114,6 @@ class ArrayDataProvider extends DataProvider ...@@ -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());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment