* Fix bug.

This commit is contained in:
xieqiyu
2022-02-24 16:30:18 +08:00
parent 5a518081d9
commit 7c65ee9555
2 changed files with 3 additions and 2 deletions

View File

@@ -2748,6 +2748,7 @@ class execution extends control
/* Set modules and branches. */
$modules = array();
$branchIDList = array(BRANCH_MAIN);
$branches = $this->project->getBranchesByProject($objectID);
$productType = 'normal';
$this->loadModel('tree');
@@ -2762,7 +2763,6 @@ class execution extends control
if($product->type != 'normal')
{
$productType = $product->type;
$branchIDList = array(BRANCH_MAIN);
if(isset($branches[$product->id]))
{
foreach($branches[$product->id] as $branchID => $branch) $branchIDList[$branchID] = $branchID;

View File

@@ -2604,7 +2604,8 @@ class storyModel extends model
}
$branches = join(',', $branches);
$storyQuery .= " OR (`product` " . helper::dbIN(array_keys($branchProducts)) . " AND `branch` " . helper::dbIN($branches) . ")";
if(!empty($normalProducts)) $storyQuery .= " OR ";
$storyQuery .= "(`product` " . helper::dbIN(array_keys($branchProducts)) . " AND `branch` " . helper::dbIN($branches) . ")";
}
if(empty($branchProducts) and empty($branchProducts)) $storyQuery .= '1 = 1';
$storyQuery .= ') ';