* Modify the code.

This commit is contained in:
tianshujie
2021-11-22 14:14:17 +08:00
parent 4058eae297
commit 8f1a017225
3 changed files with 4 additions and 5 deletions

View File

@@ -1051,7 +1051,7 @@ class bug extends control
}
else
{
$modules[$productID][0] = $this->tree->getOptionMenu($productID, 'bug', 0, 0);
$modules[$productID][0] = $this->tree->getOptionMenu($productID, 'bug');
}
/* Set product menu. */

View File

@@ -78,15 +78,14 @@
if(!$productID)
{
$product = $this->product->getByID($bug->product);
$bugBranch = isset($bug->branch) ? $bug->branch : 0;
$plans = $this->loadModel('productplan')->getPairs($bug->product, $branch);
$branches = $product->type == 'normal' ? array('' => '') : $this->loadModel('branch')->getPairs($product->id);
$modules[$bug->product][0] = $this->tree->getOptionMenu($bug->product, 'bug', 0, 0);
$modules[$bug->product][0] = $this->tree->getOptionMenu($bug->product, 'bug');
if($product->type != 'normal')
{
foreach($branches as $branchID => $branchName) $branches[$branchID] = '/' . $product->name . '/' . $branchName;
$modules[$bug->product][$bugBranch] = $this->tree->getOptionMenu($bug->product, 'bug', 0, $bugBranch);
$modules[$bug->product][$bug->branch] = $this->tree->getOptionMenu($bug->product, 'bug', 0, $bug->branch);
}
}
?>