* fix for view bug in modal.
This commit is contained in:
+19
-16
@@ -38,7 +38,6 @@ class bug extends control
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$products = array();
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('user');
|
||||
@@ -48,25 +47,29 @@ class bug extends control
|
||||
$this->loadModel('qa');
|
||||
|
||||
/* Get product data. */
|
||||
$products = array();
|
||||
$objectID = 0;
|
||||
if($this->app->openApp == 'project')
|
||||
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
|
||||
if(!isonlybody())
|
||||
{
|
||||
$objectID = $this->session->project;
|
||||
$products = $this->loadModel('project')->getProducts($objectID, false);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$objectID = $this->session->execution;
|
||||
$products = $this->loadModel('execution')->getProducts($objectID, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$products = $this->product->getPairs('', 0, 'program_asc');
|
||||
}
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
$objectID = $this->session->project;
|
||||
$products = $this->loadModel('project')->getProducts($objectID, false);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
{
|
||||
$objectID = $this->session->execution;
|
||||
$products = $this->loadModel('execution')->getProducts($objectID, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$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")));
|
||||
}
|
||||
$this->view->products = $this->products = $products;
|
||||
$openApp = ($this->app->openApp == 'project' or $this->app->openApp == 'execution') ? $this->app->openApp : 'qa';
|
||||
if(empty($this->products) and !helper::isAjaxRequest()) die($this->locate($this->createLink('product', 'showErrorNone', "moduleName=$openApp&activeMenu=bug&objectID=$objectID")));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user