* Fix code error.

This commit is contained in:
Yagami
2022-12-02 15:58:52 +08:00
parent b181c11e37
commit d7d897a8f7
2 changed files with 4 additions and 19 deletions
+2 -14
View File
@@ -1791,27 +1791,15 @@ class execution extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('doc', 'objectLibs', "type=execution")));
}
$planID = '';
if(isset($_POST['plans']))
{
foreach($_POST['plans'] as $plans)
{
foreach($plans as $planID)
{
if(!empty($planID)) break;
}
}
}
if(!empty($projectID) and $project->model == 'kanban')
{
$execution = $this->execution->getById($executionID);
$this->loadModel('kanban')->createRDKanban($execution);
}
if(!empty($planID))
if(!empty($_POST['plans']))
{
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID&copyExecutionID=&planID=$planID&confirm=no")));
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "projectID=$projectID&executionID=$executionID&copyExecutionID=&planID=1&confirm=no")));
}
else
{
+2 -5
View File
@@ -492,12 +492,9 @@ class project extends control
$planIdList = array();
foreach($_POST['plans'] as $plans)
{
foreach($plans as $planList)
foreach($plans as $planID)
{
foreach($planList as $planID)
{
$planIdList[$planID] = $planID;
}
$planIdList[$planID] = $planID;
}
}