Browse Source

Removed unnecessary lines

tags/2.0.0-beta
Jin Hu 11 years ago
parent
commit
b7948e4840
  1. 1
      framework/yii/data/ActiveDataProvider.php
  2. 1
      framework/yii/data/ArrayDataProvider.php

1
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) {

1
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());
}

Loading…
Cancel
Save