This commit is contained in:
wangyidong
2022-12-01 16:59:45 +08:00
parent 22081a43de
commit 8007950ef9
2 changed files with 18 additions and 6 deletions
+4 -3
View File
@@ -2339,7 +2339,7 @@ class projectModel extends model
$members = array_keys($this->getTeamMembers($projectID));
/* Link products of other programs. */
if($_POST['otherProducts'])
if(!empty($_POST['otherProducts']))
{
$products = array();
$otherProducts = $_POST['otherProducts'];
@@ -2424,9 +2424,10 @@ class projectModel extends model
}
/* Delete the execution linked products that is not linked with the execution. */
if((int)$projectID > 0)
$projectID = (int)$projectID;
if($projectID > 0)
{
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq((int)$projectID)->fetchPairs('id');
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq($projectID)->fetchPairs('id');
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->in($executions)->andWhere('product')->notin($products)->exec();
if(!empty($_POST['division']))