From a650ec78897246931abe01e2409d903e8b446536 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 13 Dec 2023 15:42:54 +0800 Subject: [PATCH] * Fix error for trim second param is chinese. --- module/artifactrepo/ui/browse.html.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/module/artifactrepo/ui/browse.html.php b/module/artifactrepo/ui/browse.html.php index 1171640557..4ad681a9dd 100644 --- a/module/artifactrepo/ui/browse.html.php +++ b/module/artifactrepo/ui/browse.html.php @@ -17,23 +17,21 @@ $canCreate = hasPriv('artifactrepo', 'create'); foreach($artifactRepos as $repo) { - $repo->productNames = ''; - $productList = explode(',', str_replace(' ', '', $repo->products)); + $productNames = array(); + $productList = explode(',', str_replace(' ', '', $repo->products)); if($productList) { foreach($productList as $productID) { if(!isset($products[$productID])) continue; - $repo->productNames .= ',' . zget($products, $productID, $productID); + $repo->productNames[] = zget($products, $productID, $productID); } - $repo->productNames = trim($repo->productNames, ','); + $repo->productNames = implode(',', $repo->productNames); } } $artifactRepos = initTableData($artifactRepos, $config->artifactrepo->dtable->fieldList, $this->artifactrepo); -featureBar -( -); +featureBar(); toolBar (