* Fix menu switch.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 > 浏览器 > 配置文件。
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
<tbody>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
<?php
|
||||
$param = 0;
|
||||
if($this->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");
|
||||
|
||||
Reference in New Issue
Block a user