Code

Removed show_ldap_error() calls
[gosa.git] / gosa-plugins / pptp / personal / connectivity / pptp / class_pptpAccount.inc
index 0c8c659cf019109b2cb417a748f669faa01571ad..70318d8a91c27bc556ff75b78c385ce4f4610461 100644 (file)
@@ -98,7 +98,9 @@ class pptpAccount extends plugin
       /* Log last action */
       new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
 
-      show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PPTP account with dn '%s' failed."),$this->dn));
+      if (!$ldap->success()){
+        msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+      }
 
       /* Optionally execute a command after we're done */
       $this->handle_post_events('remove',array("uid" => $this->uid));
@@ -152,7 +154,9 @@ class pptpAccount extends plugin
         new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
       }
 
-      show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PPTP account with dn '%s' failed."),$this->dn));
+      if (!$ldap->success()){
+        msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+      }
 
       /* Optionally execute a command after we're done */
       if ($this->initially_was_account == $this->is_account){