From 0c5730866348f96c59b105705c527a9e033db929 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Fri, 22 Apr 2022 15:29:27 +0800 Subject: [PATCH] * Fix bug #18167. --- module/product/config.php | 2 ++ module/product/control.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/module/product/config.php b/module/product/config.php index f44fb71908..6ed9cc9b70 100644 --- a/module/product/config.php +++ b/module/product/config.php @@ -119,3 +119,5 @@ $config->product->statisticFields['stories'] = array('draftStories', 'activ $config->product->statisticFields['bugs'] = array('unResolvedBugs', 'closedBugs', 'fixedBugs'); $config->product->statisticFields['plans'] = array('plans'); $config->product->statisticFields['releases'] = array('releases'); + +$config->product->skipCreateProduct = ',create,index,showerrornone,ajaxgetdropmenu,kanban,all,manageline,export,'; diff --git a/module/product/control.php b/module/product/control.php index fb68d3d80c..f81eaf7b4a 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -32,7 +32,7 @@ class product extends control /* Get all products, if no, goto the create page. */ $this->products = $this->product->getPairs('nocode'); $isAPI = ($this->app->viewType == 'json' or (defined('RUN_MODE') and RUN_MODE == 'api')); - if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all,manageline', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create')); + if(empty($this->products) and strpos($this->config->product->skipCreateProduct, ",$this->methodName,") === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create')); $this->view->products = $this->products; }