From 48c725fe44d296ca8773af7327e937f32b7a4556 Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Fri, 18 Dec 2020 11:27:19 +0800 Subject: [PATCH] * Adjust code. --- module/bug/control.php | 6 +++--- module/product/view/showerrornone.html.php | 2 +- module/productplan/view/linkbug.html.php | 2 +- module/productplan/view/view.html.php | 2 +- module/story/view/track.html.php | 2 +- module/testcase/model.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 744893d9e5..b4556bebd8 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -31,8 +31,8 @@ class bug extends control $this->loadModel('action'); $this->loadModel('story'); $this->loadModel('task'); - $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ); + $this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ); if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=bug"))); } @@ -598,13 +598,13 @@ class bug extends control /* Get product info. */ $productID = $bug->product; - $productName = $this->products[$productID]; + $productName = isset($this->products[$productID]) ? $this->products[$productID] : ''; $branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($bug->product); $this->executeHooks($bugID); /* Header and positon. */ - $this->view->title = "BUG #$bug->id $bug->title - " . $this->products[$productID]; + $this->view->title = "BUG #$bug->id $bug->title - " . $productName; $this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $productName); $this->view->position[] = $this->lang->bug->view; diff --git a/module/product/view/showerrornone.html.php b/module/product/view/showerrornone.html.php index fe749b95d9..c19aa47663 100644 --- a/module/product/view/showerrornone.html.php +++ b/module/product/view/showerrornone.html.php @@ -11,7 +11,7 @@ */ ?> - +
product->noProduct;?> id&programID=$project->parent", " " . $lang->program->PRJManageProducts, '', "class='btn btn-info'");?>