* Modify the get by search.

This commit is contained in:
hufangzhou
2021-11-11 11:29:54 +08:00
parent 8e9f8b860e
commit 7d9793eaa3
3 changed files with 3 additions and 2 deletions

View File

@@ -2497,7 +2497,7 @@ class bugModel extends model
}
$allBranch = "`branch` = 'all'";
if($branch !== 'all' and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in('0','$branch')";
if($branch !== 'all' and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in('$branch')";
if(strpos($bugQuery, $allBranch) !== false) $bugQuery = str_replace($allBranch, '1', $bugQuery);
$allProject = "`project` = 'all'";

View File

@@ -160,6 +160,7 @@ class productModel extends model
$this->cookie->set('preBranch', 0);
setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
}
}
return $this->session->product;
}

View File

@@ -510,7 +510,7 @@ class testcaseModel extends model
}
$allBranch = "`branch` = 'all'";
if($branch !== 'all' and strpos($caseQuery, '`branch` =') === false) $caseQuery .= " AND `branch` in('0','$branch')";
if($branch !== 'all' and strpos($caseQuery, '`branch` =') === false) $caseQuery .= " AND `branch` in('$branch')";
if(strpos($caseQuery, $allBranch) !== false) $caseQuery = str_replace($allBranch, '1', $caseQuery);
$caseQuery .= ')';
$caseQuery = str_replace('`version`', 't1.`version`', $caseQuery);