Code

Fixed problem with missing goImapSieveServer attribute in ldap
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 May 2008 13:05:11 +0000 (13:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 21 May 2008 13:05:11 +0000 (13:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10983 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/admin/systems/services/imap/class_goImapServer.inc

index ebc0f86e72ba0d11d9cc930de1cb8b132d9e51b2..b2b5ea9aa8ebce82becc2e5870d966316c470124 100644 (file)
@@ -150,6 +150,36 @@ class goImapServer extends goService {
   }
 
 
+  /* Save service */
+  function save()
+  {
+    /* Move cn to sieve server */
+    $this->goImapSieveServer= $this->cn;
+
+    plugin::save();
+    /* Check if this is a new entry ... add/modify */
+    $ldap = $this->config->get_ldap_link();
+    $ldap->cat($this->dn,array("objectClass"));
+    if($ldap->count()){
+      $ldap->cd($this->dn);
+      $ldap->modify($this->attrs);
+    }else{
+      $ldap->cd($this->dn);
+      $ldap->add($this->attrs);
+    }
+    if($this->initially_was_account){
+      new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+      $this->handle_post_events("modify");
+    }else{
+      $this->handle_post_events("add");
+      new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+    }
+    if (!$ldap->success()){
+      msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+    }
+  }
+
+
   /* Return plugin informations for acl handling */
   static function plInfo()
   {