diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc
index 329d76d8dfd2c0234a60c1b1f6092c1bc2f18678..5feb68fe7bc9dc60208efe3fb97d351d2ae4ebbc 100644 (file)
foreach ($this->dhcpObjectCache as $dn => $content){
if ($this->objectType($dn) == 'dhcpService'){
$ldap->rmdir_recursive($dn);
- show_ldap_error($ldap->get_error(), _("Removing DHCP entries failed"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_DEL, get_class()));
+ }
}
}
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), _("Removing DHCP entries failed"));
+ 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");
/* Check if exists, then remove... */
if($ldap->cat($dn)){
$ldap->rmdir_recursive($dn);
- show_ldap_error($ldap->get_error(), _("Can't remove DHCP object!"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
+ }
}
continue;
}
$ldap->cd($dn);
if ($modify){
$ldap->modify($attrs);
- show_ldap_error($ldap->get_error(), _("Can't save DHCP object!"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events("modify");
} else {
$ldap->add($attrs);
- show_ldap_error($ldap->get_error(), _("Can't save DHCP object!"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_ADD, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events("create");
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), _("Saving DHCP service failed"));
+ 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 */
if ($this->initially_was_account == $this->is_account){