From d6d649bdb4cf4fcdc731b4227750468c405e9baf Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 22 Oct 2019 10:21:49 +0800 Subject: [PATCH] * fix bug #1940. --- framework/router.class.php | 12 +++++++++++- lib/base/pager/pager.class.php | 4 ++-- lib/pager/pager.class.php | 11 +++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index fd1cbd4bdc..aa9f5c5b4c 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -38,6 +38,15 @@ class router extends baseRouter */ public $rawMethod; + /** + * 请求的原始方法名。 + * The requested params parsed from a URL. + * + * @var array + * @access public + */ + public $rawParams; + /** * 标记是否是工作流 * Whether the tag is a workflow @@ -479,6 +488,7 @@ class router extends baseRouter /* The display parameter is used to mark whether the request comes from the card display page of the ZenTao client. It should be deleted here to avoid affecting the method call. */ unset($passedParams['display']); - return parent::mergeParams($defaultParams, $passedParams); + $this->rawParams = parent::mergeParams($defaultParams, $passedParams); + return $this->rawParams; } } diff --git a/lib/base/pager/pager.class.php b/lib/base/pager/pager.class.php index 0f55d8ccdf..f5dfb758dd 100644 --- a/lib/base/pager/pager.class.php +++ b/lib/base/pager/pager.class.php @@ -271,9 +271,9 @@ class basePager * @access public * @return void */ - public function setParams() + public function setParams($params = array()) { - $this->params = $this->app->getParams(); + $this->params = $params ? $params : $this->app->getParams(); foreach($this->params as $key => $value) { if(strtolower($key) == 'rectotal') $this->params[$key] = $this->recTotal; diff --git a/lib/pager/pager.class.php b/lib/pager/pager.class.php index f4074d4853..c65a1122db 100644 --- a/lib/pager/pager.class.php +++ b/lib/pager/pager.class.php @@ -70,9 +70,16 @@ class pager extends basePager * @access public * @return void */ - public function setParams() + public function setParams($params = array()) { - parent::setParams(); + if(isset($this->app->rawParams)) + { + parent::setParams($this->app->rawParams); + } + else + { + parent::setParams(); + } /* If the original module name and method name of the request are set, the module parameter is removed. */ if($this->app->isFlow) unset($this->params['module']);