From 3973ce508bf8b867d1d07a921aae193499a1268d Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 12 May 2006 09:59:44 +0000 Subject: [PATCH] Added another set of error messages git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3314 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_plugin.inc | 1 + plugins/addons/addressbook/class_addressbook.inc | 3 ++- plugins/addons/godfs/class_dfsManagment.inc | 2 +- plugins/admin/fai/class_faiPackage.inc | 6 +++--- plugins/admin/fai/class_faiScript.inc | 8 ++++---- plugins/admin/fai/class_faiTemplate.inc | 8 ++++---- plugins/gofax/blocklists/class_blocklistManagement.inc | 3 ++- plugins/gofax/faxaccount/class_gofaxAccount.inc | 8 ++++---- 8 files changed, 21 insertions(+), 18 deletions(-) diff --git a/include/class_plugin.inc b/include/class_plugin.inc index f9ffda679..15180d73c 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -935,6 +935,7 @@ class plugin $nattrs['objectClass'][]= "gosaAdministrativeUnitTag"; $ldap->cd($dn); $ldap->modify($nattrs); + show_ldap_error($ldap->get_error(), _("Handle object tagging failed")); } else { @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not tagging ($tag) $dn - seems to have moved away", "Tagging"); } diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc index 0f71b2eac..6ec8948e9 100644 --- a/plugins/addons/addressbook/class_addressbook.inc +++ b/plugins/addons/addressbook/class_addressbook.inc @@ -177,6 +177,7 @@ class addressbook extends plugin /* Delete request is permitted, perform LDAP action */ $ldap= $this->config->get_ldap_link(); $ldap->rmdir ($this->dn); + show_ldap_error($ldap->get_error(), _("Removing addressbook entry failed")); gosa_log ("Address book object'".$this->dn."' has been removed"); } else { @@ -647,7 +648,7 @@ class addressbook extends plugin $ldap->cd ($this->dn); $this->cleanup(); $ldap->$mode ($this->attrs); - if (show_ldap_error($ldap->get_error())){ + if (show_ldap_error($ldap->get_error(), _("Saving addressbook entry failed"))){ return (1); } } diff --git a/plugins/addons/godfs/class_dfsManagment.inc b/plugins/addons/godfs/class_dfsManagment.inc index 30bbe647c..0d381a1c1 100644 --- a/plugins/addons/godfs/class_dfsManagment.inc +++ b/plugins/addons/godfs/class_dfsManagment.inc @@ -148,7 +148,7 @@ class dfsManagment extends plugin { $ldap = $this->config->get_ldap_link(); $ldap->cd($this->basedn); $ldap->rmdir($this->basedn); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Removing DFS share failed")); del_lock ($_SESSION['objectinfo']); unset ($this->dfstab); diff --git a/plugins/admin/fai/class_faiPackage.inc b/plugins/admin/fai/class_faiPackage.inc index 43ca39a03..2a9e4043a 100644 --- a/plugins/admin/fai/class_faiPackage.inc +++ b/plugins/admin/fai/class_faiPackage.inc @@ -321,6 +321,7 @@ class faiPackage extends plugin $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->dn); $ldap->rmdir_recursive($this->dn); + show_ldap_error($ldap->get_error(), _("Removing FAI package base failed")); $this->handle_post_events("remove"); } @@ -457,11 +458,10 @@ class faiPackage extends plugin $ldap->cd($this->dn); $ldap->add($this->attrs); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving FAI package base failed")); /* Do object tagging */ $this->handle_object_tagging(); - show_ldap_error($ldap->get_error()); $ldap->cd($this->dn); /* Save Package configurations */ @@ -503,7 +503,7 @@ class faiPackage extends plugin $ldap->cd($pkgdn); $ldap->add($pkgattrs); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving FAI package entry failed")); /* Handle tagging */ $this->handle_object_tagging($pkgdn, $this->gosaUnitTag); diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index 798f63946..9e3ebcbf0 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -300,6 +300,7 @@ class faiScript extends plugin $ldap = $this->config->get_ldap_link(); $ldap->cd ($this->dn); $ldap->rmdir_recursive($this->dn); + show_ldap_error($ldap->get_error(), _("Removing FAI script base failed")); $this->handle_post_events("remove"); } @@ -350,11 +351,10 @@ class faiScript extends plugin $ldap->cd($this->dn); $ldap->add($this->attrs); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Creating FAI script base failed")); /* Do object tagging */ $this->handle_object_tagging(); - show_ldap_error($ldap->get_error()); /* Prepare FAIscriptEntry to write it to ldap * First sort array. @@ -421,6 +421,7 @@ class faiScript extends plugin $ldap->cd($sub_dn); $ldap->rmdir_recursive($sub_dn); $this->handle_post_events("remove"); + show_ldap_error($ldap->get_error(), _("Removing FAI script failed")); }elseif($obj['status'] == "edited"){ $ldap->cd($sub_dn); $this->cleanup(); @@ -439,11 +440,10 @@ class faiScript extends plugin $ldap->cd($sub_dn); $ldap->add($tmp); $this->handle_post_events("add"); + show_ldap_error($ldap->get_error(), _("Saving FAI script failed")); } - show_ldap_error($ldap->get_error()); $this->handle_object_tagging($sub_dn, $this->gosaUnitTag); - show_ldap_error($ldap->get_error()); } } } diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index a8be5fe48..8303530f7 100644 --- a/plugins/admin/fai/class_faiTemplate.inc +++ b/plugins/admin/fai/class_faiTemplate.inc @@ -322,11 +322,10 @@ class faiTemplate extends plugin $ldap->cd($this->dn); $ldap->add($this->attrs); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving FAI template base failed")); /* Do object tagging */ $this->handle_object_tagging(); - show_ldap_error($ldap->get_error()); /* Prepare FAIscriptEntry to write it to ldap * First sort array. @@ -384,10 +383,12 @@ class faiTemplate extends plugin $ldap->cd($sub_dn); $ldap->rmdir_recursive($sub_dn); $this->handle_post_events("remove"); + show_ldap_error($ldap->get_error(), _("Removing FAI template base failed")); }elseif($obj['status'] == "edited"){ $ldap->cd($sub_dn); $this->cleanup(); $ldap->modify ($tmp); + show_ldap_error($ldap->get_error(), _("Saving FAI template failed")); $this->handle_post_events("modify"); }elseif($obj['status']=="new"){ @@ -400,11 +401,10 @@ class faiTemplate extends plugin $ldap->cd($sub_dn); $ldap->add($tmp); $this->handle_post_events("add"); + show_ldap_error($ldap->get_error(), _("Saving FAI template failed")); } - show_ldap_error($ldap->get_error()); $this->handle_object_tagging($sub_dn, $this->gosaUnitTag); - show_ldap_error($ldap->get_error()); } } } diff --git a/plugins/gofax/blocklists/class_blocklistManagement.inc b/plugins/gofax/blocklists/class_blocklistManagement.inc index cae6f0d63..e76415709 100644 --- a/plugins/gofax/blocklists/class_blocklistManagement.inc +++ b/plugins/gofax/blocklists/class_blocklistManagement.inc @@ -515,6 +515,7 @@ class blocklist extends plugin { $ldap= $this->config->get_ldap_link(); $ldap->rmDir($this->dn); + show_ldap_error($ldap->get_error(), _("Removing blocklist object failed")); $this->clear_fields(); $this->handle_post_events("remove"); } @@ -621,7 +622,7 @@ class blocklist extends plugin $ldap->add($this->attrs); $this->handle_post_events("add"); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving blocklist object failed")); } diff --git a/plugins/gofax/faxaccount/class_gofaxAccount.inc b/plugins/gofax/faxaccount/class_gofaxAccount.inc index 961dc6dcd..9455b4249 100644 --- a/plugins/gofax/faxaccount/class_gofaxAccount.inc +++ b/plugins/gofax/faxaccount/class_gofaxAccount.inc @@ -620,9 +620,9 @@ class gofaxAccount extends plugin $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); $this->cleanup(); -$ldap->modify ($this->attrs); + $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Removing FAX account failed")); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -739,9 +739,9 @@ $ldap->modify ($this->attrs); $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); $this->cleanup(); -$ldap->modify ($this->attrs); + $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving FAX account failed")); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ -- 2.30.2