diff --git a/config/filter.php b/config/filter.php index d8732044d1..7a2fcc15b8 100644 --- a/config/filter.php +++ b/config/filter.php @@ -130,6 +130,7 @@ $filter->svn->cat = new stdclass(); $filter->svn->diff = new stdclass(); $filter->task->create = new stdclass(); $filter->task->export = new stdclass(); +$filter->execution->default = new stdclass(); $filter->execution->story = new stdclass(); $filter->testcase->default = new stdclass(); $filter->testcase->create = new stdclass(); @@ -279,6 +280,7 @@ $filter->productplan->browse->cookie['viewType'] = 'code'; $filter->task->create->cookie['lastTaskModule'] = 'int'; $filter->task->export->cookie['checkedItem'] = 'reg::checked'; +$filter->execution->default->cookie['kanbanview'] = 'code'; $filter->execution->story->cookie['storyPreExecutionID'] = 'int'; $filter->execution->story->cookie['storyModuleParam'] = 'int'; $filter->execution->story->cookie['storyProductParam'] = 'int'; diff --git a/extension/lite/execution/ext/model/lite.php b/extension/lite/execution/ext/model/lite.php index 2930759820..af0eb526da 100644 --- a/extension/lite/execution/ext/model/lite.php +++ b/extension/lite/execution/ext/model/lite.php @@ -40,7 +40,17 @@ public function setMenu($executionID, $buildID = 0, $extra = '') if(strpos('|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions($lowerMethod); if(strpos('|relation|maintainrelation|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions('gantt'); - if($lowerModule == 'task' || ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false)) $this->lang->TRActions = $this->getTRActions($this->session->kanbanview); + if($lowerModule == 'task' or ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false)) + { + if($this->session->kanbanview) + { + $this->lang->TRActions = $this->getTRActions($this->session->kanbanview); + } + elseif($this->cookie->kanbanview) + { + $this->lang->TRActions = $this->getTRActions($this->cookie->kanbanview); + } + } $this->lang->modulePageNav = $modulePageNav; } diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 09d2ec232c..3756752e26 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1393,30 +1393,30 @@ class baseRouter if($this->checkModuleName($moduleName)) { - /* 1. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */ - $modulePath = $this->getModuleRoot($appName) . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + /* 1. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */ + $modulePath = $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; - /* 2. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */ - $modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + /* 2. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */ + if($this->config->vision != 'rnd') + { + $modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; + } /* 3. 尝试查找商业版本是否有此模块。 Try to find the module in other editon. */ if($this->config->edition != 'open') { $modulePath = $this->getExtensionRoot() . $this->config->edition . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; } - /* 4. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */ - if($this->config->vision != 'rnd') - { - $modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; - } + /* 4. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */ + $modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; - /* 5. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */ - return $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS; + /* 5. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */ + return $this->getModuleRoot($appName) . $moduleName . DS; } }