diff --git a/framework/base/control.class.php b/framework/base/control.class.php index 6c174342a7..1778c5c804 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -961,13 +961,6 @@ class baseControl */ public function locate($url) { - /* If openApp is set, use it next visit. */ - $module = $this->app->rawModule; - if(isset($this->lang->navGroup->$module) and $this->lang->navGroup->$module != $this->app->openApp) - { - setCookie('openApp', $this->app->openApp); - } - header("location: $url"); exit; } diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 5e8583aa49..09bba36b39 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -864,7 +864,6 @@ class baseRouter if(isset($_COOKIE['openApp']) and $_COOKIE['openApp']) { $this->openApp = $_COOKIE['openApp']; - setCookie('openApp', ''); } else { @@ -873,6 +872,22 @@ class baseRouter } } + /** + * 保存openApp到cookie,下次请求使用,常用在locate, reload方法。 + * Save openApp to cookie, use it next visit, when locate, reload page. + * + * @access public + * @return void + */ + public function saveOpenApp() + { + $module = $this->rawModule; + if(isset($this->lang->navGroup->$module) and $this->lang->navGroup->$module != $this->openApp) + { + setCookie('openApp', $this->openApp); + } + } + /** * 根据用户浏览器的语言设置和服务器配置,选择显示的语言。 * 优先级:$lang参数 > session > cookie > 浏览器 > 配置文件。 diff --git a/module/story/control.php b/module/story/control.php index fece02029e..169e69a8f8 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -863,6 +863,11 @@ class story extends control { $this->product->setMenu($story->product, $story->branch); } + elseif($from == 'qa') + { + $products = $this->product->getProductPairsByProject(0, 'noclosed'); + $this->loadModel('qa')->setMenu($products, $story->product); + } $this->executeHooks($storyID); diff --git a/module/story/view/zerocase.html.php b/module/story/view/zerocase.html.php index 89ab3104f6..7711ca80cd 100644 --- a/module/story/view/zerocase.html.php +++ b/module/story/view/zerocase.html.php @@ -45,6 +45,7 @@ $story):?> app->openApp == 'project') $param = $this->session->project; if($this->app->openApp == 'execution') $param = $this->session->execution; $viewLink = $this->createLink('story', 'view', "storyID=$story->id&version=0¶m=$param");