*Fixbug_sunjun_17344

This commit is contained in:
sunjun
2022-04-08 09:37:49 +08:00
parent bf8c28ebe8
commit 7c540be4d7
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -90,6 +90,7 @@ $lang->product->confirmChangeProgram = "The projects linked with this {$lang->pr
$lang->product->changeProgramError = "The {$lang->SRCommon} of this {$lang->productCommon} has been linked to the project, please unlink it before proceeding";
$lang->product->programEmpty = 'Program should not be empty!';
$lang->product->nameIsDuplicate = "『%s』 product line already exists, please reset!";
$lang->product->nameIsDuplicated = "『%s』『%s』 exists. Go to Admin->System->Data->Recycle Bin to restore it, if you are sure it is deleted.";
$lang->product->id = 'ID';
$lang->product->program = "Program";
+1
View File
@@ -90,6 +90,7 @@ $lang->product->confirmChangeProgram = "如下项目既关联了该{$lang->produ
$lang->product->changeProgramError = "该{$lang->productCommon}的{$lang->SRCommon}已经关联到项目,请取消关联后再操作";
$lang->product->programEmpty = '项目集不能为空';
$lang->product->nameIsDuplicate = "『%s』产品线已经存在,请重新设置!";
$lang->product->nameIsDuplicated = "『%s』已经有『%s』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。";
$lang->product->id = '编号';
$lang->product->program = "所属项目集";
+7
View File
@@ -622,6 +622,13 @@ class productModel extends model
$line->name = $this->post->lineName;
$line->root = $this->config->systemMode == 'new' ? $product->program : 0;
$line->order = $maxOrder;
$lines = $this->dao->select('name')->from(TABLE_MODULE)->where('type')->eq('line')->andWhere('root')->eq($line->root)->andWhere('name')->eq($line->name)->fetch();
if(!empty($lines))
{
dao::$errors['lineName'] = sprintf($this->lang->product->nameIsDuplicated, $this->lang->product->line, $line->name);
return false;
}
$this->dao->insert(TABLE_MODULE)->data($line)->exec();
if(!dao::isError())