diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index c39f1544ad..0441cf1ed8 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu $lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; $lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s."; $lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project %s: %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project %s: %s.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; $lang->execution->accessDenied = "Zugriff zu {$lang->executionCommon} verweigert!"; $lang->execution->tips = 'Hinweis'; $lang->execution->afterInfo = "{$lang->executionCommon} wurde erstellt. Als nächstes können Sie "; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 242f35f23b..3d1edaddc3 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu $lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; $lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s."; $lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project "%s": %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project "%s": %s.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; $lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!"; $lang->execution->tips = 'Note'; $lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can "; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 2c882fcda4..57eaa38f6f 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu $lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; $lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s."; $lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project %s: %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project %s: %s.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; $lang->execution->accessDenied = "Votre accès au {$lang->executionCommon} est refusé ! Désolé."; $lang->execution->tips = 'Note'; $lang->execution->afterInfo = "Le {$lang->executionCommon} a été créé avec succès ! Ensuite vous pouvez "; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index 766a66f77f..c1f02f6280 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -337,6 +337,8 @@ $lang->execution->unfinishedExecution = "This {$lang->executionCommon} h $lang->execution->unfinishedTask = "[%s] unfinished tasks. "; $lang->execution->unresolvedBug = "[%s] unresolved bugs. "; $lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index b29446e64e..eb4a3b6bd7 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "{$lang->executionCommon}的开 $lang->execution->errorEnd = "{$lang->executionCommon}的截止时间不能大于所属项目的结束时间%s。"; $lang->execution->errorLetterProject = "阶段的计划开始时间不能小于所属项目的计划开始时间%s。"; $lang->execution->errorGreaterProject = "阶段的计划完成时间不能大于所属项目的计划完成时间%s。"; -$lang->execution->errorCommonBegin = $lang->executionCommon . '“%s”开始日期应大于等于项目“%s”的开始日期:%s。'; -$lang->execution->errorCommonEnd = $lang->executionCommon . '“%s”截止日期应小于等于项目“%s”的截止日期:%s。'; +$lang->execution->errorCommonBegin = $lang->executionCommon . '开始日期应大于等于项目的开始日期:%s。'; +$lang->execution->errorCommonEnd = $lang->executionCommon . '截止日期应小于等于项目的截止日期:%s。'; $lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!"; $lang->execution->tips = '提示'; $lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:"; diff --git a/module/execution/model.php b/module/execution/model.php index 4226b06b88..124dd02c13 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -305,7 +305,7 @@ class executionModel extends model return false; } - if($this->config->systemMode == 'new' and !empty($_POST['name'])) $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end'], $_POST['name']); + if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end']); 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) and !empty($execution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $execution->name); + if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end); 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' and !empty($oldExecution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $oldExecution->name); + if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end); if(dao::isError()) return false; $execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->putoff['id'], $this->post->uid); @@ -1117,16 +1117,15 @@ class executionModel extends model * @param int $projectID * @param string $begin * @param string $end - * @param string $executionName * @access public * @return void */ - public function checkBeginAndEndDate($projectID, $begin, $end, $executionName) + public function checkBeginAndEndDate($projectID, $begin, $end) { $project = $this->loadModel('project')->getByID($projectID); - if($begin < $project->begin) dao::$errors['begin'] = sprintf($this->lang->execution->errorCommonBegin, $executionName, $project->name, $project->begin); - if($end > $project->end) dao::$errors['end'] = sprintf($this->lang->execution->errorCommonEnd, $executionName, $project->name, $project->end); + if($begin < $project->begin) dao::$errors['begin'] = sprintf($this->lang->execution->errorCommonBegin, $project->begin); + if($end > $project->end) dao::$errors['end'] = sprintf($this->lang->execution->errorCommonEnd, $project->end); } /*