Code

Added download link
[gosa.git] / plugins / admin / departments / class_departmentGeneric.inc
index afa6e2744fa614fa12cdeccee17141b40c69b41e..62ceff1262dc8e1e1850980263c897e35acd512c 100644 (file)
@@ -172,7 +172,7 @@ class department extends plugin
                $message[]= _("The field 'Name' contains the reserved word 'incoming'.".
                                " Please choose another name.");
        }
-       if (preg_match ('/[,#+:=>\\\\\/]/', $this->ou)){
+       if (preg_match ('/[#+:=>\\\\\/]/', $this->ou)){
                $message[]= _("The field 'Name' contains invalid characters.");
        }
        if (!is_phone_nr($this->telephoneNumber)){
@@ -197,7 +197,9 @@ class department extends plugin
        $a= $ldap->fetch();
        $ldap->cd($this->dn);
        if (count($a)){
-               $ldap->modify($this->attrs);
+               $this->cleanup();
+$ldap->modify ($this->attrs); 
+
                $this->handle_post_events('modify');
        } else {
                $ldap->add($this->attrs);