From f2f524b232a5bafd889bfb3756b2f116368260fd Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 30 Jun 2006 03:19:35 +0000 Subject: [PATCH] Fixed error msgs for systems git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3997 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_servGeneric.inc | 1 - plugins/admin/systems/class_termDNS.inc | 4 ++-- plugins/admin/systems/class_terminalGeneric.inc | 6 +++--- plugins/admin/systems/class_terminalService.inc | 2 +- plugins/admin/systems/class_terminalStartup.inc | 2 +- plugins/admin/systems/class_winGeneric.inc | 4 ++-- plugins/admin/systems/class_workstationGeneric.inc | 10 +++++----- plugins/admin/systems/class_workstationService.inc | 3 +-- plugins/admin/systems/class_workstationStartup.inc | 2 +- 9 files changed, 16 insertions(+), 18 deletions(-) diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 5a6f75271..8d31c6884 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -185,7 +185,6 @@ class servgeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); - show_ldap_error($ldap->get_error(), _("Removing server failed")); show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/generic with dn '%s' failed."),$this->dn)); /* Delete references to object groups */ diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 143cbd81b..ad36377c5 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -230,7 +230,7 @@ class termDNS extends plugin while($attr = $ldap->fetch()){ $ldap->cd($attr['dn']); $ldap->rmDir($attr['dn']); - show_ldap_error("Record:".$ldap->get_error(), _("Removing terminal from DNS object failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of terminal/dns acoount with dn '%s' failed."),$this->dn)); } */ } @@ -445,7 +445,7 @@ class termDNS extends plugin /* Display errors */ if($ldap->get_error() != "Success"){ - show_ldap_error("Record:".$ldap->get_error(), _("Saving terminal to DNS object failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of terminal/dns account with dn '%s' failed."),$this->dn)); } } } diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 98d7e0db9..c3f08d653 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -158,7 +158,7 @@ class termgeneric extends plugin $ldap->cd($this->dn); $ldap->modify($attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system terminal/generic (FAIstate) with dn '%s' failed."),$this->dn)); switch($_POST['saction']){ case 'wake': @@ -316,7 +316,7 @@ class termgeneric extends plugin if($ldap->count()){ $this->netConfigDNS->remove_from_parent(); $ldap->rmDir($this->dn); - show_ldap_error($ldap->get_error(), _("Removing terminal failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of object system terminal/generic with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress)); @@ -473,7 +473,7 @@ class termgeneric extends plugin } $this->netConfigDNS->cn = $this->cn; $this->netConfigDNS->save($this->dn); - show_ldap_error($ldap->get_error(), _("Saving terminal failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/generic with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->postcreate(); diff --git a/plugins/admin/systems/class_terminalService.inc b/plugins/admin/systems/class_terminalService.inc index c84058364..6be26538e 100644 --- a/plugins/admin/systems/class_terminalService.inc +++ b/plugins/admin/systems/class_terminalService.inc @@ -413,7 +413,7 @@ class termservice extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving terminal service information failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/service with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); } diff --git a/plugins/admin/systems/class_terminalStartup.inc b/plugins/admin/systems/class_terminalStartup.inc index 7a02964f2..cba2b3954 100644 --- a/plugins/admin/systems/class_terminalStartup.inc +++ b/plugins/admin/systems/class_terminalStartup.inc @@ -383,7 +383,7 @@ class termstartup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving terminal startup settings failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system terminal/startup with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); } diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc index d1fb73268..fb557fdf5 100644 --- a/plugins/admin/systems/class_winGeneric.inc +++ b/plugins/admin/systems/class_winGeneric.inc @@ -123,7 +123,7 @@ class wingeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); - show_ldap_error($ldap->get_error(), _("Removing Samba workstation failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of system wingeneric/generic with dn '%s' failed."),$this->dn)); $this->handle_post_events("remove"); /* Delete references to object groups */ @@ -221,7 +221,7 @@ class wingeneric extends plugin $this->netConfigDNS->cn = $this->cn; $this->netConfigDNS->save($this->dn); - show_ldap_error($ldap->get_error(), _("Saving Samba workstation failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system wingeneric/generic with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->postcreate(); diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index 56912e078..976f42105 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -171,8 +171,8 @@ class workgeneric extends plugin $ldap->cd($this->dn); $ldap->modify($attrs); - show_ldap_error($ldap->get_error()); - + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic (FAIstate) with dn '%s' failed."),$this->dn)); + $this->didAction= TRUE; } } @@ -290,7 +290,7 @@ class workgeneric extends plugin $this->netConfigDNS->remove_from_parent(); $ldap= $this->config->get_ldap_link(); $ldap->rmdir($this->dn); - show_ldap_error($ldap->get_error(), _("Removing workstation failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of system workstation/generic with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress)); @@ -435,7 +435,7 @@ class workgeneric extends plugin $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); $ldap->cd($this->dn); $ldap->add($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving workstation failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn)); if(!$this->didAction){ $this->handle_post_events("add"); } @@ -453,7 +453,7 @@ class workgeneric extends plugin } $this->netConfigDNS->cn = $this->cn; $this->netConfigDNS->save($this->dn); - show_ldap_error($ldap->get_error(), _("Saving workstation failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn)); } } diff --git a/plugins/admin/systems/class_workstationService.inc b/plugins/admin/systems/class_workstationService.inc index c61b38e95..53ba10508 100644 --- a/plugins/admin/systems/class_workstationService.inc +++ b/plugins/admin/systems/class_workstationService.inc @@ -418,8 +418,7 @@ class workservice extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - - show_ldap_error($ldap->get_error(), _("Saving workstation services failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/service with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); } diff --git a/plugins/admin/systems/class_workstationStartup.inc b/plugins/admin/systems/class_workstationStartup.inc index b04971069..a795da93a 100644 --- a/plugins/admin/systems/class_workstationStartup.inc +++ b/plugins/admin/systems/class_workstationStartup.inc @@ -1034,7 +1034,7 @@ class workstartup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving workstation startup settings failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/startup with dn '%s' failed."),$this->dn)); $this->handle_post_events("modify"); } -- 2.30.2