* [bug#56374,done,1h] fix not show tip error.

This commit is contained in:
tianshujie
2024-12-31 10:32:18 +08:00
committed by 刘梦艺
parent 9a0e65a55d
commit 7ca36a8813
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ declare(strict_types=1);
* @link https://www.zentao.net
*/
namespace zin;
jsVar('unmodifiableProducts', $unmodifiableProducts);
jsVar('unmodifiableProducts', array_values($unmodifiableProducts));
jsVar('unmodifiableBranches', $unmodifiableBranches);
jsVar('unmodifiableMainBranches', $unmodifiableMainBranches);
jsVar('allProducts', $allProducts);
+3 -1
View File
@@ -1217,6 +1217,7 @@ class projectZen extends project
$projectBranches = $this->project->getBranchGroup($projectID, array_keys($linkedProducts));
/* If the story of the product which linked the project,don't allow to remove the product. */
$unmodifiableProducts = array();
$unmodifiableBranches = array();
$unmodifiableMainBranches = array();
foreach($linkedProducts as $productID => $linkedProduct)
@@ -1230,6 +1231,7 @@ class projectZen extends project
if(!empty($projectStories[$productID][$branchID]) || !empty($projectBranches[$productID][$branchID]))
{
if($branchID == BRANCH_MAIN) $unmodifiableMainBranches[$productID] = $branchID;
array_push($unmodifiableProducts, $productID);
array_push($unmodifiableBranches, $branchID);
}
}
@@ -1240,7 +1242,7 @@ class projectZen extends project
$this->view->linkedBranches = $linkedBranches;
$this->view->linkedProducts = $linkedProducts;
$this->view->unmodifiableProducts = $this->getUnmodifiableProducts($projectID, $project);
$this->view->unmodifiableProducts = in_array($project->model, array('waterfall', 'waterfallplus')) ? $this->getUnmodifiableProducts($projectID, $project) : $unmodifiableProducts;
$this->view->unmodifiableBranches = $unmodifiableBranches;
$this->view->unmodifiableMainBranches = $unmodifiableMainBranches;
$this->view->allProducts = $allProducts;