* Fix bug #50186.
This commit is contained in:
@@ -2394,10 +2394,11 @@ class executionModel extends model
|
||||
public function updateProducts(int $executionID, object|array $postData): bool
|
||||
{
|
||||
$this->loadModel('user');
|
||||
$products = array_filter(array_merge(zget($postData, 'products', array()), zget($postData, 'otherProducts', array())));
|
||||
$branches = zget($postData, 'branch', array(0));
|
||||
$plans = zget($postData, 'plans', array());
|
||||
$oldProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->fetchGroup('product', 'branch');
|
||||
$otherProducts = zget($postData, 'otherProducts', array());
|
||||
$products = !empty($otherProducts) ? array_filter(array_merge(zget($postData, 'products', array()), $otherProducts)) : zget($postData, 'products', array());
|
||||
$branches = zget($postData, 'branch', array(0));
|
||||
$plans = zget($postData, 'plans', array());
|
||||
$oldProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->fetchGroup('product', 'branch');
|
||||
if(empty($_POST['otherProducts'])) $this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->eq($executionID)->exec();
|
||||
$members = array_keys($this->getTeamMembers($executionID));
|
||||
if(empty($products))
|
||||
|
||||
Reference in New Issue
Block a user