From c338b9a2377f18b4911ea8efa6fb5d73afd9ede1 Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 27 Oct 2022 06:30:12 +0000 Subject: [PATCH] * Adjust codes. --- module/product/model.php | 2 +- module/project/control.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index 61d5d9060d..4cfed74124 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -605,7 +605,7 @@ class productModel extends model * * @param array $appendIDList * @access public - * @return void + * @return array */ public function getProductsGroupByProgram($appendIDList = array()) { diff --git a/module/project/control.php b/module/project/control.php index 48112765c3..0ebebed49e 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -2135,6 +2135,8 @@ class project extends control return $this->send(array('result' => 'fail', 'message' => dao::getError())); } + $oldProducts = $this->product->getProducts($projectID); + $this->project->updateProducts($projectID); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); @@ -2144,7 +2146,6 @@ class project extends control if($executionID) $this->execution->updateProducts($executionID); } - $oldProducts = $this->product->getProducts($projectID); $newProducts = $this->product->getProducts($projectID); $oldProductIDs = array_keys($oldProducts); $newProductIDs = array_keys($newProducts);