* Modify the code.

This commit is contained in:
tianshujie
2021-11-29 14:16:10 +08:00
parent f2b60bda9e
commit 96a46aa2ca
10 changed files with 57 additions and 83 deletions
+2 -2
View File
@@ -530,7 +530,7 @@ class bugModel extends model
->andWhere('tostory')->eq(0)
->andWhere('toTask')->eq(0)
->beginIF(!empty($products))->andWhere('product')->in($products)->fi()
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
->beginIF($branch !== '' and $branch !== 'all')->andWhere('branch')->in("0,$branch")->fi()
->beginIF(!empty($executions))->andWhere('execution')->in($executions)->fi()
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
->andWhere('deleted')->eq(0)
@@ -2499,7 +2499,7 @@ class bugModel extends model
}
$allBranch = "`branch` = 'all'";
if($branch !== 'all' and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in($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'";