diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 25efd6cfdd..f2ce3a11af 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -497,7 +497,6 @@ class baseHTML } $tab = $_COOKIE['openApp']; - $misc .= "data-app='{$tab}'"; $referer = strtolower($_SERVER['HTTP_REFERER']); $refererParts = parse_url($referer); $refererLink = $config->requestType == 'PATH_INFO' ? $refererParts['path'] : $refererParts['query']; @@ -506,6 +505,8 @@ class baseHTML $gobackList = isset($_COOKIE['goback']) ? json_decode($_COOKIE['goback'], true) : array(); $gobackLink = isset($gobackList[$tab]) ? $gobackList[$tab] : ''; + if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $tab . '"'; + /* If the link of the referer is not the link of the current page or the link of the index, the cookie and gobackLink will be updated. */ if(!preg_match("/(m=|\/)(index|search|$currentModule)(&f=|-)(index|buildquery|$currentMethod)(&|-|\.)?/", $refererLink)) { diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index e869c45568..2029d9b7cf 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -88,7 +88,7 @@ if($this->app->openApp != 'product') { - common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . ($this->app->openApp == 'project' ? 'project' : 'product') . "'", $lang->bug->toStory); + common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . $this->app->openApp . "'", $lang->bug->toStory); common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap'); } diff --git a/module/projectstory/control.php b/module/projectstory/control.php index 5923f093e4..fbbf987d3f 100644 --- a/module/projectstory/control.php +++ b/module/projectstory/control.php @@ -69,6 +69,8 @@ class projectStory extends control */ public function view($storyID) { + $this->session->set('productList', $this->app->getURI(true), 'product'); + $story = $this->loadModel('story')->getByID($storyID); echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->project); } diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php index add9531f91..d8bdc4ad70 100644 --- a/module/story/view/change.html.php +++ b/module/story/view/change.html.php @@ -70,7 +70,7 @@ lastEditedDate); echo html::submitButton(); - if(!isonlybody()) echo html::a($app->session->storyList ? $app->session->storyList : inlink('view', "storyID=$story->id"), $lang->goback, '', 'class="btn btn-wide"'); + if(!isonlybody()) echo html::backButton(); ?> diff --git a/module/task/control.php b/module/task/control.php index 15fc428e99..5a3ee3d474 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -666,6 +666,8 @@ class task extends control */ public function view($taskID) { + $this->session->set('executionList', $this->app->getURI(true), 'execution'); + $taskID = (int)$taskID; $task = $this->task->getById($taskID, true); if(!$task) die(js::error($this->lang->notFound) . js::locate('back')); diff --git a/module/task/view/report.html.php b/module/task/view/report.html.php index e5be52a658..83d3a0188b 100644 --- a/module/task/view/report.html.php +++ b/module/task/view/report.html.php @@ -13,7 +13,7 @@