From 4fd69c66616e08ed632b5fd02d644b4fd50b2dbc Mon Sep 17 00:00:00 2001 From: wangjianhua Date: Wed, 17 Nov 2021 09:59:16 +0000 Subject: [PATCH] * Finish task 44503. --- module/build/model.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/build/model.php b/module/build/model.php index 8a556bf792..81efc3e0d9 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -288,7 +288,8 @@ class buildModel extends model { if(empty($build->releaseID) and (strpos($params, 'nodone') !== false) and ($build->executionStatus === 'done')) continue; if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue; - $builds[$key] = ((strpos($params, 'withbranch') !== false and $build->branchName) ? $build->branchName . '/' : '') . $build->name; + $branchName = $build->branchName ? $build->branchName : $this->lang->branch->main; + $builds[$key] = (strpos($params, 'withbranch') !== false ? $branchName . '/' : '') . $build->name; } if(!$builds) return $sysBuilds; @@ -302,7 +303,11 @@ class buildModel extends model ->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi() ->andWhere('deleted')->eq(0) ->fetchPairs(); - foreach($releases as $buildID => $releaseName) $builds[$buildID] = ((strpos($params, 'withbranch') !== false and $productBuilds[$buildID]->branchName) ? $productBuilds[$buildID]->branchName . '/' : '') . $releaseName; + foreach($releases as $buildID => $releaseName) + { + $branchName = $productBuilds[$buildID]->branchName ? $productBuilds[$buildID]->branchName : $this->lang->branch->main; + $builds[$buildID] = (strpos($params, 'withbranch') !== false ? $branchName . '/' : '') . $releaseName; + } } return $sysBuilds + $builds;