diff --git a/module/product/control.php b/module/product/control.php index 56f247b4c2..0a69ee6b05 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -31,7 +31,7 @@ class product extends control /* Get all products, if no, goto the create page. */ $this->products = $this->product->getPairs(); - if(empty($this->products) and strpos('create', $this->methodName) === false) $this->locate($this->createLink('product', 'create')); + if(empty($this->products) and strpos('create', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create')); $this->view->products = $this->products; } diff --git a/module/project/control.php b/module/project/control.php index 9d03da17cf..3d334d9f52 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -24,7 +24,7 @@ class project extends control if($this->methodName != 'computeburn') { $this->projects = $this->project->getPairs(); - if(!$this->projects and $this->methodName != 'create') $this->locate($this->createLink('project', 'create')); + if(!$this->projects and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('project', 'create')); } } @@ -39,7 +39,6 @@ class project extends control */ public function index($locate = 'yes', $status = 'all', $projectID = 0) { - if(empty($this->projects)) $this->locate($this->createLink('project', 'create')); if($locate == 'yes') $this->locate($this->createLink('project', 'task')); $this->commonAction($projectID);