From: hickert Date: Thu, 16 Sep 2010 13:25:30 +0000 (+0000) Subject: Added ldap-error handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d334f722c7d65797221dddecb6dd0fb3108e68c8;p=gosa.git Added ldap-error handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19717 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc index 1a7eac72c..04b08f688 100644 --- a/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc +++ b/gosa-plugins/goto/admin/systems/goto/Device/class_Device.inc @@ -199,12 +199,24 @@ class Device extends plugin $ldap->cd($this->config->current['BASE']); $ldap->cd($this->dn); + // Perform action modify/create if($this->initially_was_account){ $ldap->modify($this->attrs); + new log("modify","Device/".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, LDAP_MOD, get_class())); + }else{ + $this->handle_post_events("modify"); + } }else{ $ldap->add($this->attrs); + new log("create","Device/".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, LDAP_ADD, get_class())); + }else{ + $this->handle_post_events("add"); + } } - echo $ldap->get_error(); }