diff --git a/module/testcase/control.php b/module/testcase/control.php index fe2735701e..7cb0cdb893 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -114,6 +114,7 @@ class testcase extends control $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'case', $showModule) : array(); /* Assign. */ + $tree = $moduleID ? $this->tree->getByID($moduleID) : ''; $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testcase->common; $this->view->position[] = html::a($this->createLink('testcase', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]); $this->view->position[] = $this->lang->testcase->common; @@ -122,7 +123,7 @@ class testcase extends control $this->view->productName = $this->products[$productID]; $this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'case', $startModuleID = 0, $branch); $this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createCaseLink'), '', $branch); - $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all; + $this->view->moduleName = $moduleID ? $tree->name : $this->lang->tree->all; $this->view->moduleID = $moduleID; $this->view->summary = $this->testcase->summary($cases); $this->view->pager = $pager;