Code

reworked printer ppd selection
[gosa.git] / plugins / admin / systems / class_servDB.inc
index 260097ab20ed07c72e140dfbf458708b31249460..230407daf24872e885e9f8c001e9976fd40494e5 100644 (file)
@@ -147,6 +147,10 @@ class servdb extends plugin
           $message[]= sprintf(_("The attribute '%s' is empty or contains invalid characters."), $attr);
         }
       }
+      /* goKrbPassword is a must field, if goKrbServer is used as objectClass */
+      if ($this->goKrbPassword == "" ){
+        $message[]= sprintf(_("The specified kerberos password is empty."), $attr);
+      }
     }
     if (in_array("goFaxServer", $this->objectclasses)){
       if ($this->goFaxAdmin == "" || preg_match("/ /", $this->goFaxAdmin)){
@@ -168,7 +172,7 @@ class servdb extends plugin
     if (in_array("goImapServer", $this->objectclasses) && 
         $this->goImapName != $this->goImapName_old) {
       // Attribute has changed
-      if(!preg_match("/^[a-z0-9\.]+$/", $this->goImapName)) {
+      if(!preg_match("/^[a-z0-9.-]+$/", $this->goImapName)) {
         $message[]= sprintf(_("The imap name string needs to be a hostname or an IP-address."));
       }
     }
@@ -216,8 +220,6 @@ class servdb extends plugin
     }
     $this->attrs = array_reverse($this->attrs);
 
-
-
     /* Write to LDAP */
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($this->dn);