X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_glpiManufacturer.inc;h=aeedaa4d2ddc07d2098f576214f4c810be8b8359;hb=3644520502707cc1a35a915bfa358105e86c4818;hp=8463743a2ccae2684c5030105e2068cd9a80f40a;hpb=22f3e06448dd3c990c5997af704c3505a3563031;p=gosa.git diff --git a/plugins/admin/systems/class_glpiManufacturer.inc b/plugins/admin/systems/class_glpiManufacturer.inc index 8463743a2..aeedaa4d2 100644 --- a/plugins/admin/systems/class_glpiManufacturer.inc +++ b/plugins/admin/systems/class_glpiManufacturer.inc @@ -78,13 +78,21 @@ class glpiManufacturer extends plugin $tmp[$attrs]=$this->$attrs; } - if($this->Edit_Add == "add"){ - $this->parent->handle->addEnterprisesType($tmp); - }else{ - $this->parent->handle->updateEnterprisesType($tmp,$this->ID); + $allok = true; + if(empty($tmp['name'])){ + print_red(_("Please specify a name.")); + $allok = false; } - $this->editMode=false; + if($allok){ + if($this->Edit_Add == "add"){ + $this->parent->handle->addEnterprisesType($tmp); + $this->editMode=false; + }else{ + $this->parent->handle->updateEnterprisesType($tmp,$this->ID); + $this->editMode=false; + } + } } if($this->editMode == true){