From a2d2c55e945db859f91a8b403093db221e703682 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 7 Dec 2022 11:25:41 +0800 Subject: [PATCH] * Code for task#78668. Add trim. --- module/execution/control.php | 2 +- module/project/control.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index e0441803e8..852ff8a755 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1312,7 +1312,7 @@ class execution extends control { $showBranch = true; $branchPairs = $branchGroups[$build->product]; - foreach(explode(',', $build->branch) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; + foreach(explode(',', trim($build->branch, ',')) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; $build->branchName = trim($build->branchName, ','); } } diff --git a/module/project/control.php b/module/project/control.php index e9bd7a942d..11669e7579 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1466,7 +1466,7 @@ class project extends control { $showBranch = true; $branchPairs = $branchGroups[$build->product]; - foreach(explode(',', $build->branch) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; + foreach(explode(',', trim($build->branch, ',')) as $branchID) $build->branchName .= "{$branchPairs[$branchID]},"; $build->branchName = trim($build->branchName, ','); } }