From c696a41d55c9da7425ca946aaa6fb80e2d63e78c Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 5 Jul 2016 10:00:17 +0800 Subject: [PATCH] * fix bug #866. --- module/tree/control.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/module/tree/control.php b/module/tree/control.php index 66687544c8..27d206f7e8 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -28,7 +28,17 @@ class tree extends control if(strpos('story|bug|case', $viewType) !== false) { $product = $this->loadModel('product')->getById($rootID); - if($product->type != 'normal') $this->view->branches = $this->loadModel('branch')->getPairs($product->id); + if($product->type != 'normal') + { + $branches = $this->loadModel('branch')->getPairs($product->id); + if($currentModuleID) + { + $branchName = $branches[$branch]; + unset($branches); + $branches[$branch] = $branchName; + } + $this->view->branches = $branches; + } $this->view->root = $product; } /* The viewType is doc. */