diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 2b8604b88b..5518f9dfd8 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1771,6 +1771,9 @@ class baseRouter $params = $_GET; } + /* Fix bug #3267. Param 'words' is not validated when searching. */ + if($this->rawModule == 'search' and $this->rawMethod == 'index') unset($params['words']); + $this->params = $this->mergeParams($defaultParams, $params); } diff --git a/framework/router.class.php b/framework/router.class.php index b2bb34ae6a..eaced7d1d4 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -552,6 +552,7 @@ class router extends baseRouter /* 如果请求的方法名不是browse、create、edit、view、delete、export中的任何一个,则需要添加action参数来传递请求的方法名。 */ /* If the requested method name is not any of browse, create, edit, view, delete, or export, you need to add an action parameter to pass the requested method name. */ if(isset($this->config->workflowaction->default->actions) and !in_array($this->rawMethod, $this->config->workflowaction->default->actions)) $passedParams['action'] = $this->rawMethod; + /* 添加module参数来传递请求的模块名。 */ /* Add the module parameter to pass the requested module name. */ $passedParams['module'] = $this->rawModule; @@ -559,12 +560,6 @@ class router extends baseRouter $passedParams = array_reverse($passedParams); } - /* Fix bug #3267. Param 'words' is not validated when searching. */ - if($this->rawModule == 'search' and $this->rawMethod == 'index') - { - unset($passedParams['words']); - } - /* display参数用来标记请求是否来自禅道客户端的卡片展示页面,此处应该删掉以避免对方法调用产生影响。 */ /* 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']);