* Modify execution edit api.

This commit is contained in:
songchenxuan
2023-07-05 10:58:54 +08:00
parent e5920bc0fc
commit 0b1e083e4c
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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)));
+1 -1
View File
@@ -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]))