From 8d4bf893e1f405c35ff571703578eaad6e479d23 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Mon, 18 Nov 2013 11:23:11 -0500 Subject: [PATCH] Fixes #1221: make it easier to subclass BaseDataProvider with custom pagination. --- framework/yii/data/BaseDataProvider.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/framework/yii/data/BaseDataProvider.php b/framework/yii/data/BaseDataProvider.php index db1e057..cf094c7 100644 --- a/framework/yii/data/BaseDataProvider.php +++ b/framework/yii/data/BaseDataProvider.php @@ -165,10 +165,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa public function getPagination() { if ($this->_pagination === null) { - $this->_pagination = new Pagination; - if ($this->id !== null) { - $this->_pagination->pageVar = $this->id . '-page'; - } + $this->setPagination([]); } return $this->_pagination; }