diff --git a/module/testcase/control.php b/module/testcase/control.php index 7365bd7bef..ac1d2a8663 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -323,12 +323,13 @@ class testcase extends control /** * View a test case. * - * @param int $caseID - * @param int $version + * @param int $caseID + * @param int $version + * @param string $from * @access public * @return void */ - public function view($caseID, $version = 0) + public function view($caseID, $version = 0, $from = 'testcase') { $case = $this->testcase->getById($caseID, $version); if(!$case) die(js::error($this->lang->notFound) . js::locate('back')); @@ -341,6 +342,7 @@ class testcase extends control $this->view->position[] = $this->lang->testcase->view; $this->view->case = $case; + $this->view->from = $from; $this->view->version = $version ? $version : $case->version; $this->view->productName = $this->products[$productID]; $this->view->modulePath = $this->tree->getParents($case->module); diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index 370528758d..f8211b1bf1 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -174,7 +174,7 @@ testcase->statusList[$case->status]; - if($case->version > $case->currentVersion) + if($case->version > $case->currentVersion and $from == 'testtask') { echo " ({$lang->testcase->changed} "; echo html::a($this->createLink('testcase', 'confirmchange', "caseID=$case->id"), $lang->confirm, 'hiddenwin');