* Fix tree methods.
This commit is contained in:
+3
-3
@@ -820,7 +820,7 @@ class bugZen extends bug
|
||||
protected function setOptionMenu(object $bug, object $product): object
|
||||
{
|
||||
$bug = $this->getBugBranches($bug, $product);
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($bug->productID, 'bug', 0, ($bug->branch === 'all' or !isset($bug->branches[$bug->branch])) ? 0 : $bug->branch);
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($bug->productID, 'bug', 0, ($bug->branch === 'all' or !isset($bug->branches[$bug->branch])) ? 'all' : (string)$bug->branch);
|
||||
if(empty($moduleOptionMenu)) return print(js::locate(helper::createLink('tree', 'browse', "productID={$bug->productID}&view=story")));
|
||||
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
@@ -1194,7 +1194,7 @@ class bugZen extends bug
|
||||
$execution = $this->loadModel('execution')->getByID($bug->execution);
|
||||
|
||||
/* Get module option menu. */
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($bug->product, 'bug', 0, $bug->branch);
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($bug->product, 'bug', 0, (string)$bug->branch);
|
||||
if(!isset($moduleOptionMenu[$bug->module])) $moduleOptionMenu += $this->tree->getModulesName((array)$bug->module);
|
||||
|
||||
/* Get bugs of current product. */
|
||||
@@ -1416,7 +1416,7 @@ class bugZen extends bug
|
||||
$this->view->builds = $builds;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $branches;
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($product->id, 'bug', 0, $branch === 'all' ? 0 : (int)$branch);
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($product->id, 'bug', 0, $branch === 'all' ? 'all' : (string)$branch);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -620,7 +620,7 @@ class docModel extends model
|
||||
list($objects['project'], $objects['execution'], $objects['product']) = $this->getObjectsByDoc(array_keys($docs));
|
||||
foreach($docs as $docID => $doc)
|
||||
{
|
||||
if(!isset($modules[$doc->lib])) $modules[$doc->lib] = $this->tree->getOptionMenu((int)$doc->lib, 'doc', 0, 0, 'nodeleted', 'all', ' > ');
|
||||
if(!isset($modules[$doc->lib])) $modules[$doc->lib] = $this->tree->getOptionMenu((int)$doc->lib, 'doc', 0, 'all', 'nodeleted', 'all', ' > ');
|
||||
$doc->moduleName = zget($modules[$doc->lib], $doc->module);
|
||||
$doc->moduleName = ltrim($doc->moduleName, '/');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user