* adjust the end date checking logic.
+ add the end date check logic when update a project.
This commit is contained in:
@@ -141,7 +141,7 @@ class projectModel extends model
|
||||
->batchcheck($this->config->project->create->requiredFields, 'notempty')
|
||||
->checkIF($project->begin != '', 'begin', 'date')
|
||||
->checkIF($project->end != '', 'end', 'date')
|
||||
->check('end', 'gt', $project->begin)
|
||||
->checkIF($project->end != '', 'end', 'gt', $project->begin)
|
||||
->check('name', 'unique')
|
||||
->check('code', 'unique')
|
||||
->exec();
|
||||
@@ -184,6 +184,7 @@ class projectModel extends model
|
||||
->batchcheck($this->config->project->edit->requiredFields, 'notempty')
|
||||
->checkIF($project->begin != '', 'begin', 'date')
|
||||
->checkIF($project->end != '', 'end', 'date')
|
||||
->checkIF($project->end != '', 'end', 'gt', $project->begin)
|
||||
->check('name', 'unique', "id!=$projectID")
|
||||
->check('code', 'unique', "id!=$projectID")
|
||||
->where('id')->eq($projectID)
|
||||
|
||||
Reference in New Issue
Block a user