From 656e13e3b95f00ce84e0c23d20b14595e0e7d622 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Thu, 5 Aug 2021 17:34:04 +0800 Subject: [PATCH] * adjust for construct function. --- module/bug/control.php | 5 ++++- module/testcase/control.php | 5 ++++- module/testreport/control.php | 5 ++++- module/testtask/control.php | 1 - 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index f4c367d23d..ad21b8272a 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -66,9 +66,12 @@ class bug extends control { $products = $this->product->getPairs('', 0, 'program_asc'); } - if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID"))); } + else + { + $products = $this->product->getPairs('', 0, 'program_asc'); + } $this->view->products = $this->products = $products; } diff --git a/module/testcase/control.php b/module/testcase/control.php index 43c2155970..71e4ccb6ee 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -61,9 +61,12 @@ class testcase extends control { $products = $this->product->getPairs(); } - if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testcase&objectID=$objectID"))); } + else + { + $products = $this->product->getPairs(); + } $this->view->products = $this->products = $products; } diff --git a/module/testreport/control.php b/module/testreport/control.php index c34d56064d..4a8b25e7f2 100644 --- a/module/testreport/control.php +++ b/module/testreport/control.php @@ -64,9 +64,12 @@ class testreport extends control { $products = $this->product->getPairs(); } - if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testreport&objectID=$objectID"))); } + else + { + $products = $this->product->getPairs(); + } $this->view->products = $this->products = $products; } diff --git a/module/testtask/control.php b/module/testtask/control.php index e3d16c988c..079e646c00 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -59,7 +59,6 @@ class testtask extends control { $products = $this->product->getPairs(); } - if(empty($products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID"))); } else