* Fix bug#26938.

This commit is contained in:
xieqiyu
2022-10-11 14:10:16 +00:00
parent 730dc63542
commit 4eb54b95e6
+3 -2
View File
@@ -421,8 +421,9 @@ class testcase extends control
setcookie('caseModule', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
/* Use this session link, when the tab is not QA, a session of the case list exists, and the session is not from the Dynamic page. */
$useSession = $this->app->tab != 'qa' and $this->session->caseList and strpos($this->session->caseList, 'dynamic') === false;
$response['locate'] = $useSession ? $this->session->caseList : $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all&param=0&orderBy=id_desc");
$useSession = ($this->app->tab != 'qa' and $this->session->caseList and strpos($this->session->caseList, 'dynamic') === false);
$locateLink = $this->app->tab == 'project' ? $this->createLink('project', 'testcase', "projectID={$this->session->project}") : $this->createLink('testcase', 'browse', "productID={$this->post->product}&branch={$this->post->branch}&browseType=all&param=0&orderBy=id_desc");
$response['locate'] = $useSession ? $this->session->caseList : $locateLink;
return $this->send($response);
}
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));