Code

Fixed blocklists saving for lists in tagged departments
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 May 2008 05:44:18 +0000 (05:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 8 May 2008 05:44:18 +0000 (05:44 +0000)
-The objectclasses added by plugin::save() were overwritten.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10833 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc

index 2c0d00c1becf920f1ae09324110811c79f35671b..a558a26c16de62b0b697571c1ff344a1b5c47f55 100644 (file)
@@ -225,17 +225,17 @@ class blocklistGeneric extends plugin
   /* Save to LDAP */
   function save()
   {
-    plugin::save();
-
     /* Type selection */
     if ($this->type == BLOCK_LIST_SEND){
       $type= "goFaxSBlocklist";
-      $this->attrs['objectClass']= "goFaxSBlock";
+      $this->objectclasses = array("goFaxSBlock");
     } else {
       $type= "goFaxRBlocklist";
-      $this->attrs['objectClass']= "goFaxRBlock";
+      $this->objectclasses = array("goFaxRBlock");
     }
 
+    plugin::save();
+
     /* Add list */
     if (count($this->goFaxBlocklist)){
       $this->attrs[$type]= $this->goFaxBlocklist;
@@ -262,6 +262,7 @@ class blocklistGeneric extends plugin
       new log("create","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
       $this->handle_post_events("add");
     }
+
     if (!$ldap->success()){
       msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
     }