* Fix bug#11462.

This commit is contained in:
leiyong
2021-04-01 05:57:20 +03:00
parent 74a1d60d91
commit 4496315212
6 changed files with 33 additions and 25 deletions
+6 -5
View File
@@ -40,15 +40,16 @@ class testtask extends control
$this->loadModel('product');
/* Get product data. */
$projectID = 0;
$objectID = 0;
if($this->app->openApp == 'project')
{
$projectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($projectID, false);
$objectID = $this->session->project;
$products = $this->loadModel('project')->getProducts($objectID, false);
}
elseif($this->app->openApp == 'execution')
{
$products = $this->loadModel('execution')->getProducts($this->session->execution, false);
$objectID = $this->session->execution;
$products = $this->loadModel('execution')->getProducts($objectID, false);
}
else
{
@@ -57,7 +58,7 @@ class testtask extends control
$this->view->products = $this->products = $products;
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&projectID=$projectID")));
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=testtask&objectID=$objectID")));
}
/**