From fcf56a2c8c63063498b159fccf1183a09c58efca Mon Sep 17 00:00:00 2001 From: Yagami Date: Fri, 17 Feb 2023 13:52:58 +0800 Subject: [PATCH] * Remove unused code. --- module/execution/model.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 153aad5dab..d3a544a17f 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -781,7 +781,6 @@ class executionModel extends model } elseif(isset($data->codes) and $executionCode) { - /* Check unique code for edited executions. */ if(isset($codeList[$executionCode])) { dao::$errors["codes\[$executionID\]"][] = sprintf($this->lang->error->unique, $this->lang->execution->execCode, $executionCode); @@ -848,18 +847,6 @@ class executionModel extends model } } - /* Project begin and end check. */ - if($project and $execution->begin < $project->begin) - { - dao::$errors['begin'] = sprintf($this->lang->execution->errorLetterProject, $project->begin); - return false; - } - if($project and $execution->end > $project->end) - { - dao::$errors['end'] = sprintf($this->lang->execution->errorGreaterProject, $project->end); - return false; - } - foreach($extendFields as $extendField) { $executions[$executionID]->{$extendField->field} = $this->post->{$extendField->field}[$executionID]; @@ -871,6 +858,7 @@ class executionModel extends model if(empty($executions[$executionID]->begin)) dao::$errors["begins{$executionID}"][] = sprintf($this->lang->error->notempty, $this->lang->execution->begin); if(empty($executions[$executionID]->end)) dao::$errors["ends{$executionID}"][] = sprintf($this->lang->error->notempty, $this->lang->execution->end); + /* Project begin and end check. */ if(!empty($executions[$executionID]->begin) and !empty($executions[$executionID]->end)) { if($executions[$executionID]->begin > $executions[$executionID]->end)