* adjust the end date checking logic.

+ add the end date check logic when update a project.
This commit is contained in:
wangchunsheng
2011-11-29 03:07:46 +00:00
parent 6984062222
commit f0b1da3206

View File

@@ -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)