From 158f6e482df385f27e0f11f3363d7c7e3f1f5ecc Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 8 Mar 2021 16:59:30 +0800 Subject: [PATCH] * Modify method name getProductsByProject to getProducts. --- module/product/control.php | 4 ++-- module/product/model.php | 6 +++--- module/project/control.php | 2 +- module/projectrelease/control.php | 2 +- module/story/control.php | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 789064d94c..be6cc15f8e 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -202,7 +202,7 @@ class product extends control if($this->app->rawModule == 'projectstory') { $this->session->set('currentProductType', $product->type); - $projectProducts = $this->product->getProductsByProject($this->session->project); + $projectProducts = $this->product->getProducts($this->session->project); $productPlans = $this->execution->getPlans($projectProducts); if($browseType == 'bybranch') $param = $branch; @@ -901,7 +901,7 @@ class product extends control $moduleGroup = zget($this->lang->navGroup, $module); $moduleGroup = in_array($moduleGroup, array('product', 'qa'))? $moduleGroup : 'project'; - $products = $moduleGroup == 'project' ? $this->product->getProductsByProject($this->session->project) : $this->product->getList(); + $products = $moduleGroup == 'project' ? $this->product->getProducts($this->session->project) : $this->product->getList(); $this->view->link = $this->product->getProductLink($module, $method, $extra); $this->view->productID = $productID; diff --git a/module/product/model.php b/module/product/model.php index 1879b36110..f7bf5437b3 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -303,7 +303,7 @@ class productModel extends model */ public function getProductPairsByProject($projectID, $status = 'all') { - $products = empty($projectID) ? $this->getList() : $this->getProductsByProject($projectID, $status); + $products = empty($projectID) ? $this->getList() : $this->getProducts($projectID, $status); $pairs = array(); if(!empty($products)) { @@ -321,7 +321,7 @@ class productModel extends model * @access public * @return array */ - public function getProductsByProject($projectID, $status = 'all') + public function getProducts($projectID, $status = 'all') { return $this->dao->select('t1.branch, t1.plan, t2.*') ->from(TABLE_PROJECTPRODUCT)->alias('t1') @@ -378,7 +378,7 @@ class productModel extends model $products = array(); if($projectID) { - $pairs = $this->getProductsByProject($projectID); + $pairs = $this->getProducts($projectID); $products = $this->getByIdList(array_keys($pairs)); } else diff --git a/module/project/control.php b/module/project/control.php index 0bd75d88e2..684f1a3842 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -495,7 +495,7 @@ class project extends control $this->app->session->set('projectBrowse', $this->app->getURI(true)); - $products = $this->loadModel('product')->getProductsByProject($projectID);; + $products = $this->loadModel('product')->getProducts($projectID);; $linkedBranches = array(); foreach($products as $product) { diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php index e2a218cb6c..9d4764c6d5 100644 --- a/module/projectrelease/control.php +++ b/module/projectrelease/control.php @@ -71,7 +71,7 @@ class projectrelease extends control $this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse; $this->view->position[] = $this->lang->release->browse; $this->view->execution = $execution; - $this->view->products = $this->loadModel('product')->getProductsByProject($this->session->project); + $this->view->products = $this->loadModel('product')->getProducts($this->session->project); $this->view->releases = $this->projectrelease->getList($this->session->project, $type); $this->view->type = $type; $this->display(); diff --git a/module/story/control.php b/module/story/control.php index 87a0ea1963..6158a60a2e 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1413,7 +1413,7 @@ class story extends control $pager = new pager($recTotal, $recPerPage, $pageID); $tracks = $this->story->getTracks($productID, $branch, $pager); - if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProductsByProject($this->session->project); + if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->project); $this->view->title = $this->lang->story->track; $this->view->position[] = $this->lang->story->track;