Code

Fix regression in commit r19721.
[gosa.git] / trunk / gosa-plugins / fai / admin / fai / class_faiScriptEntry.inc
index 7600ac934b66b80b9b85cdae65f59201c8efa07d..27c1a77602081a323efebfcffeb4790983d36a14 100644 (file)
@@ -137,13 +137,14 @@ class faiScriptEntry extends plugin
       $message[] = msgPool::duplicated(_("Name"));
     }
 
+    if($this->cn == ""){
+      $message[] = msgPool::required(_("Name"));
+    }
+
     if(preg_match("/[^a-z0-9_\-]/i",$this->cn)){
       $message[] = msgPool::invalid(_("Name"),$this->cn,"/[a-z0-9_\-]/i");
     }
 
-    if(trim($this->cn)  == ""){
-      $message[] = msgPool::required(_("Name"));
-    }
     $s = trim($this->FAIscript);
     if($s == ""){
       $message[]= msgPool::required(_("Script"));