* Modify execution edit api.
This commit is contained in:
@@ -119,8 +119,10 @@ class executionEntry extends entry
|
||||
{
|
||||
$oldExecution = $this->loadModel('execution')->getByID($executionID);
|
||||
|
||||
$useCode = $this->checkCodeUsed();
|
||||
/* Set $_POST variables. */
|
||||
$fields = 'project,code,name,begin,end,lifetime,desc,days,acl,status,PO,PM,QD,RD';
|
||||
$fields = 'project,name,begin,end,lifetime,desc,days,acl,status,PO,PM,QD,RD';
|
||||
if($useCode) $fields .= 'code';
|
||||
$this->batchSetPost($fields, $oldExecution);
|
||||
|
||||
$this->setPost('whitelist', $this->request('whitelist', explode(',', $oldExecution->whitelist)));
|
||||
|
||||
@@ -583,7 +583,7 @@ class executionModel extends model
|
||||
{
|
||||
$this->app->loadLang('project');
|
||||
$multipleProducts = $this->loadModel('product')->getMultiBranchPairs();
|
||||
if(is_string($_POST['branch']) !== false) $_POST['branch'] = json_decode($_POST['branch'], true);
|
||||
if(isset($_POST['branch']) and is_string($_POST['branch']) !== false) $_POST['branch'] = json_decode($_POST['branch'], true);
|
||||
foreach($_POST['products'] as $index => $productID)
|
||||
{
|
||||
if(isset($multipleProducts[$productID]) and !isset($_POST['branch'][$index]))
|
||||
|
||||
Reference in New Issue
Block a user