diff --git a/framework/control.class.php b/framework/control.class.php index a7f8a16d69..d6ce3486ec 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -21,11 +21,11 @@ include dirname(__FILE__) . '/base/control.class.php'; class control extends baseControl { /** - * Check requiredFields and set exportFields for workflow. - * - * @param string $moduleName - * @param string $methodName - * @param string $appName + * Check requiredFields and set exportFields for workflow. + * + * @param string $moduleName + * @param string $methodName + * @param string $appName * @access public * @return void */ @@ -80,7 +80,7 @@ class control extends baseControl /** * Go to preference setting page if preference not setted. - * + * * @access public * @return void */ @@ -91,7 +91,7 @@ class control extends baseControl if($this->app->getModuleName() == 'my' and $this->app->getMethodName() == 'changepassword') return true; if($this->app->getModuleName() == 'my' and $this->app->getMethodName() == 'preference') return true; - if(!isset($this->config->preferenceSetted)) + if(!isset($this->config->preferenceSetted)) { $this->locate(helper::createLink('my', 'preference')); } @@ -295,7 +295,7 @@ class control extends baseControl /** * Check require with flow field when post data. - * + * * @access public * @return void */ diff --git a/framework/router.class.php b/framework/router.class.php index 569859956e..d544f7e939 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -498,6 +498,18 @@ class router extends baseRouter /* Prepend other params. */ if($methodName == 'operate') array_unshift($params, $this->rawMethod); // $params = array('close', 1); if($methodName == 'batchOperate') array_unshift($params, $this->rawMethod); // $params = array('close', 1); + if($methodName == 'browse') + { + if(isset($params[0]) and $params[0] == 'bysearch') + { + $params[0] = ''; + array_unshift($params, 'bysearch'); + } + else + { + array_unshift($params, 'browse'); + } + } array_unshift($params, $this->rawModule); // $params = array($module, 'close', 1); array_unshift($params, $methodName); // $params = array('operate', $module, 'close', 1); array_unshift($params, $moduleName); // $params = array('flow', 'operate', $module, 'close', 1); @@ -519,6 +531,18 @@ class router extends baseRouter $params = array_reverse($params); // $params = array('label' => 1, 'mode' => 'search'); /* Prepend other params. */ + if($methodName == 'browse') + { + if(isset($params['label']) and $params['label'] == 'bysearch') + { + $params['label'] = ''; + $params['mode'] = 'bysearch'; + } + else + { + $params['mode'] = 'browse'; + } + } $params['module'] = $this->rawModule; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module); $params[$this->config->methodVar] = $methodName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse'); $params[$this->config->moduleVar] = $moduleName; // $param = array('label' => 1, 'mode' => 'search', 'module' => $module, 'f' => 'browse', 'm' => 'flow');