* Finish Bug #30687
This commit is contained in:
@@ -640,7 +640,11 @@ class build extends control
|
||||
{
|
||||
$branchPairs = $this->loadModel('branch')->getPairs($build->product, 'noempty');
|
||||
$branches = array('' => '') + array(BRANCH_MAIN => $this->lang->branch->main);
|
||||
if($build->branch) $branches += array($build->branch => $branchPairs[$build->branch]);
|
||||
|
||||
if($build->branch)
|
||||
{
|
||||
foreach(explode(',', $build->branch) as $branchID) $branches += array($branchID => $branchPairs[$branchID]);
|
||||
}
|
||||
|
||||
$this->config->product->search['fields']['branch'] = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
|
||||
$this->config->product->search['params']['branch']['values'] = $branches;
|
||||
|
||||
@@ -155,14 +155,14 @@ class treeModel extends model
|
||||
|
||||
if($type == 'line') $rootID = 0;
|
||||
|
||||
$branches = array($branch => '');
|
||||
$branches = array();
|
||||
if($branch != 'all' and strpos('story|bug|case', $type) !== false)
|
||||
{
|
||||
$product = $this->loadModel('product')->getById($rootID);
|
||||
if($product and $product->type != 'normal')
|
||||
{
|
||||
$branchPairs = $this->loadModel('branch')->getPairs($rootID, 'all');
|
||||
$branches = array($branch => $branchPairs[$branch]);
|
||||
foreach(explode(',', $branch) as $branchID) $branches += array($branchID => $branchPairs[$branchID]);
|
||||
}
|
||||
elseif($product and $product->type == 'normal')
|
||||
{
|
||||
@@ -175,7 +175,7 @@ class treeModel extends model
|
||||
|
||||
$treeMenu = array();
|
||||
foreach($branches as $branchID => $branch)
|
||||
{
|
||||
{
|
||||
$stmt = $this->dbh->query($this->buildMenuQuery($rootID, $type, $startModule, $branchID, $param));
|
||||
$modules = array();
|
||||
while($module = $stmt->fetch())
|
||||
|
||||
Reference in New Issue
Block a user