X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fdhcp%2Fadmin%2Fsystems%2Fservices%2Fdhcp%2Fclass_servDHCP.inc;h=5feb68fe7bc9dc60208efe3fb97d351d2ae4ebbc;hb=362e2b9a81d3bde32512811ede7525ab017eead5;hp=329d76d8dfd2c0234a60c1b1f6092c1bc2f18678;hpb=95c92d67f0ab7660a995607fd264a6ea1f2aa798;p=gosa.git 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 329d76d8d..5feb68fe7 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_servDHCP.inc @@ -379,7 +379,9 @@ class servdhcp extends goService 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())); + } } } @@ -394,7 +396,9 @@ class servdhcp extends goService $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"); @@ -447,7 +451,9 @@ class servdhcp extends goService /* 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; } @@ -521,13 +527,17 @@ class servdhcp extends goService $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"); @@ -552,7 +562,9 @@ class servdhcp extends goService $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){