Code

Fixed a couple of static/non-static error messages
[gosa.git] / plugins / admin / systems / class_workstationGeneric.inc
index 5b5a58a6c54cd1c54800664159b908cebb789cd3..14641c0b7617a239781a3e90249338d17245ec3b 100644 (file)
@@ -435,6 +435,11 @@ class workgeneric extends plugin
       $message[]= _("The required field 'Workstation name' is not set.");
     }
 
+    /* Check if given name is a valid host/dns name */
+    if(!is_dns_name($this->cn)){
+      $message[] = _("Please specify a valid name for this object.");
+    }
+
     if ($this->orig_dn != $this->dn){
       $ldap= $this->config->get_ldap_link();
       $ldap->cd ($this->base);
@@ -610,7 +615,7 @@ class workgeneric extends plugin
 
   /* Return plugin informations for acl handling 
       #FIXME FAIscript seams to ununsed within this class... */ 
-  function plInfo()
+  static function plInfo()
   {
     return (array(  
           "plShortName"   => _("Generic"),