mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-18 01:07:37 +08:00
Removed unnecessary lines
This commit is contained in:
@ -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) {
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user