* fix bug #30274.
This commit is contained in:
@@ -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']))
|
||||
|
||||
Reference in New Issue
Block a user