* It is judged that the project name cannot be empty.

This commit is contained in:
leiyong
2022-06-29 06:02:23 +00:00
parent 08d27f8d79
commit 6f4e6390cb
+3 -3
View File
@@ -305,7 +305,7 @@ class executionModel extends model
return false;
}
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end'], $_POST['name']);
if($this->config->systemMode == 'new' and !empty($_POST['name'])) $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end'], $_POST['name']);
if(dao::isError()) return false;
/* Determine whether to add a sprint or a stage according to the model of the execution. */
@@ -500,7 +500,7 @@ class executionModel extends model
if(in_array($execution->status, array('closed', 'suspended'))) $this->computeBurn($executionID);
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $execution->name);
if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project) and !empty($execution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $execution->name);
if(dao::isError()) return false;
/* Child stage inherits parent stage permissions. */
@@ -869,7 +869,7 @@ class executionModel extends model
->remove('comment')
->get();
if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $oldExecution->name);
if($this->config->systemMode == 'new' and !empty($oldExecution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $oldExecution->name);
if(dao::isError()) return false;
$execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->putoff['id'], $this->post->uid);