* adjust for flow.

This commit is contained in:
wangyidong
2021-04-07 14:45:44 +08:00
parent 0ca7f575aa
commit e0068f3bdc
2 changed files with 32 additions and 8 deletions

View File

@@ -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
*/

View File

@@ -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');