From 4adf6e0a52c93cf8d2d0bbf4b19db91a3d470f8e Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 15 Dec 2021 17:17:57 +0800 Subject: [PATCH] * Fix bug #17015. --- module/execution/control.php | 2 +- module/product/control.php | 2 +- module/qa/model.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/execution/control.php b/module/execution/control.php index c754ee17fa..c3fcece2cf 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -42,7 +42,7 @@ class execution extends control if(defined('IN_UPGRADE') and IN_UPGRADE) return false; $this->executions = $this->execution->getPairs(0, 'all', 'nocode'); - $skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers'); + $skipCreateStep = array('computeburn', 'ajaxgetdropmenu', 'executionkanban', 'ajaxgetteammembers', 'all'); if(!in_array($this->methodName, $skipCreateStep) and $this->app->tab == 'execution') { if(!$this->executions and $this->methodName != 'index' and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('execution', 'create')); diff --git a/module/product/control.php b/module/product/control.php index 569a8ec0fa..c874536119 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('nocode|all'); - if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create')); + if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all', $this->methodName) === false and $this->app->getViewType() != 'mhtml') $this->locate($this->createLink('product', 'create')); $this->view->products = $this->products; } diff --git a/module/qa/model.php b/module/qa/model.php index c128e4d35f..a640766e2a 100644 --- a/module/qa/model.php +++ b/module/qa/model.php @@ -33,7 +33,7 @@ class qaModel extends model setcookie('preBranch', $branch, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true); $product = $this->loadModel('product')->getById($productID); - if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); + if(isset($product) and $product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch); if($this->app->rawModule == 'product' and $this->app->rawMethod == 'showerrornone') $this->lang->switcherMenu = '';