diff --git a/module/bug/control.php b/module/bug/control.php index ee20c28353..920fa963d6 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -208,13 +208,20 @@ class bug extends control $showBranch = isset($this->config->bug->browse->showBranch) ? $this->config->bug->browse->showBranch : 1; $showModule = !empty($this->config->datatable->bugBrowse->showModule) ? $this->config->datatable->bugBrowse->showModule : ''; $productName = ($productID and isset($this->products[$productID])) ? $this->products[$productID] : $this->lang->product->allProduct; + + $product = $this->product->getById($productID); + if($product and $product->type != 'normal') + { + $this->app->loadLang('datatable'); + $this->lang->datatable->showBranch = sprintf($this->lang->datatable->showBranch, $this->lang->product->branchName[$product->type]); + } /* Set view. */ $this->view->title = $productName . $this->lang->colon . $this->lang->bug->common; $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName,'','title=' . $productName); $this->view->position[] = $this->lang->bug->common; $this->view->productID = $productID; - $this->view->product = $this->product->getById($productID); + $this->view->product = $product; $this->view->projectProducts = $this->product->getProducts($this->projectID); $this->view->productName = $productName; $this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID); diff --git a/module/bug/model.php b/module/bug/model.php index 8e8b91b1a1..cc0f36232b 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2648,7 +2648,7 @@ class bugModel extends model * @access public * @return void */ - public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $executions = array(), $plans = array(), $stories = array(), $tasks = array(), $mode = 'datatable') + public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $executions = array(), $plans = array(), $stories = array(), $tasks = array(), $mode = 'datatable', $showBranch = '') { /* Check the product is closed. */ $canBeChanged = common::canBeChanged('bug', $bug); @@ -2751,7 +2751,7 @@ class bugModel extends model echo "" . zget($this->lang->bug->confirmedList, $bug->confirmed, $bug->confirmed) . " "; break; case 'title': - if($bug->branch and isset($branches[$bug->branch])) echo "{$branches[$bug->branch]} "; + if($bug->branch and isset($branches[$bug->branch]) and $showBranch) echo "{$branches[$bug->branch]} "; if($bug->module and isset($modulePairs[$bug->module])) echo "{$modulePairs[$bug->module]} "; echo $canView ? html::a($bugLink, $bug->title, null, "style='color: $bug->color'") : "{$bug->title}"; break; diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index b32720fd99..0538e2f3e6 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -264,7 +264,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow