* Check product name when create project.

This commit is contained in:
qiyu-xie
2020-12-10 14:51:31 +08:00
parent 5182c4ed3b
commit 9cbec051b2
7 changed files with 18 additions and 5 deletions
+7
View File
@@ -1244,6 +1244,13 @@ class programModel extends model
return false;
}
$existProductName = $this->dao->select('name')->from(TABLE_PRODUCT)->where('name')->eq($_POST['productName'])->fetch('name');
if(!empty($existProductName))
{
dao::$errors[] = $this->lang->program->existProductName;
return false;
}
$requiredFields = $this->config->program->PRJCreate->requiredFields;
if($this->post->delta == 999) $requiredFields = trim(str_replace(',end,', ',', ",{$requiredFields},"), ',');