* Deal with the branch is empty.
This commit is contained in:
@@ -111,7 +111,7 @@ class bug extends control
|
||||
$browseType = strtolower($browseType);
|
||||
|
||||
/* Set productID, moduleID, queryID and branch. */
|
||||
$branch = ($this->cookie->preBranch and $branch === '') ? $this->cookie->preBranch : $branch;
|
||||
$branch = ($this->cookie->preBranch !== '' and $branch === '') ? $this->cookie->preBranch : $branch;
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
setcookie('preBranch', $branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
|
||||
@@ -125,7 +125,7 @@ class bug extends control
|
||||
setcookie('bugModule', (int)$param, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
$_COOKIE['bugBranch'] = 0;
|
||||
setcookie('bugBranch', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
if($browseType == '') setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
if($browseType == '') setcookie('treeBranch', $branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
}
|
||||
if($browseType == 'bybranch') setcookie('bugBranch', $branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('bugBrowseType', $browseType);
|
||||
@@ -142,6 +142,10 @@ class bug extends control
|
||||
setcookie('treeBranch', $branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
$browseType = 'unclosed';
|
||||
}
|
||||
else
|
||||
{
|
||||
$branch = $this->cookie->treeBranch;
|
||||
}
|
||||
|
||||
if($this->projectID and !$productID)
|
||||
{
|
||||
@@ -149,7 +153,7 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, 'bug', 0, array('treeModel', 'createBugLink'), '', $browseType == '' ? $branch : $this->cookie->treeBranch);
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, 'bug', 0, array('treeModel', 'createBugLink'), '', $branch);
|
||||
}
|
||||
|
||||
if(($browseType != 'bymodule' && $browseType != 'bybranch')) $this->session->set('bugBrowseType', $browseType);
|
||||
|
||||
Reference in New Issue
Block a user