From: cajus Date: Fri, 12 May 2006 12:32:12 +0000 (+0000) Subject: Fixed a set of show_ldap_errors X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9e143613e3bf1c2509acbe260a2d5b21a81c7897;p=gosa.git Fixed a set of show_ldap_errors git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3319 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc index c50184cf9..e20dcc26e 100644 --- a/plugins/admin/applications/class_applicationGeneric.inc +++ b/plugins/admin/applications/class_applicationGeneric.inc @@ -170,6 +170,7 @@ class application extends plugin { $ldap= $this->config->get_ldap_link(); $ldap->rmDir($this->dn); + show_ldap_error($ldap->get_error(), _("Removing application failed")); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -181,12 +182,14 @@ class application extends plugin $og= new ogroup($this->config, $ldap->getDN()); unset($og->member[$this->dn]); $og->save (); + show_ldap_error($ldap->get_error(), sprintf(_("Removing application from objectgroup '%s' failed"), $og->dn)); } $ldap->search ("(&(objectClass=posixGroup)(gosaMemberApplication=".$this->cn."))", array("cn")); while ($attrs= $ldap->fetch()){ $ag= new appgroup($this->config, $ldap->getDN()); $ag->removeApp($this->cn); $ag->save (); + show_ldap_error($ldap->get_error(), sprintf(_("Removing application from group '%s' failed"), $ag->dn)); } } @@ -385,7 +388,7 @@ class application extends plugin $ldap->add($this->attrs); $this->handle_post_events("add"); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving application failed")); } function set_picture($filename) diff --git a/plugins/admin/applications/class_applicationParameters.inc b/plugins/admin/applications/class_applicationParameters.inc index 12e055a77..310efad57 100644 --- a/plugins/admin/applications/class_applicationParameters.inc +++ b/plugins/admin/applications/class_applicationParameters.inc @@ -123,9 +123,9 @@ class applicationParameters extends plugin @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $this->attributes, "Save"); $this->cleanup(); -$ldap->modify ($this->attrs); + $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Removing application parameters failed")); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -185,9 +185,9 @@ $ldap->modify ($this->attrs); @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $this->attributes, "Save"); $this->cleanup(); -$ldap->modify ($this->attrs); + $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving applications parameters failed")); /* Optionally execute a command after we're done */ $this->handle_post_events('modify'); diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 0f107a772..ed7aaf1de 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -166,6 +166,7 @@ class department extends plugin $ldap= $this->config->get_ldap_link(); $ldap->cd ($this->dn); $ldap->recursive_remove(); + show_ldap_error($ldap->get_error(), _("Removing department failed")); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -329,7 +330,7 @@ class department extends plugin $ldap->add($this->attrs); $this->handle_post_events('add'); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving department failed")); /* The parameter forces only to set must_be_tagged, and don't touch any objects This will be done later */ diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index e49419096..1c596cb50 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -282,7 +282,7 @@ class faiVariable extends plugin /* Write FAIscript to ldap*/ $ldap->cd($this->dn); $this->cleanup(); -$ldap->modify ($this->attrs); + $ldap->modify ($this->attrs); }else{ /* Write FAIscript to ldap*/ @@ -291,11 +291,10 @@ $ldap->modify ($this->attrs); $ldap->cd($this->dn); $ldap->add($this->attrs); } - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving FAI variable 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. @@ -354,12 +353,14 @@ $ldap->modify ($this->attrs); $ldap->cd($sub_dn); $ldap->rmdir_recursive($sub_dn); $this->handle_post_events("remove"); + show_ldap_error($ldap->get_error(), _("Removing FAI variable failed")); }elseif($obj['status'] == "edited"){ $ldap->cd($sub_dn); $this->cleanup(); -$ldap->modify ($tmp); + $ldap->modify ($tmp); $this->handle_post_events("modify"); + show_ldap_error($ldap->get_error(), _("Saving FAI variable failed")); }elseif($obj['status']=="new"){ if($tmp['description'] == array()){ @@ -371,11 +372,10 @@ $ldap->modify ($tmp); $ldap->cd($sub_dn); $ldap->add($tmp); $this->handle_post_events("add"); + show_ldap_error($ldap->get_error(), _("Saving FAI variable 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/groups/class_groupAcl.inc b/plugins/admin/groups/class_groupAcl.inc index bfbb2a519..01e05a0de 100644 --- a/plugins/admin/groups/class_groupAcl.inc +++ b/plugins/admin/groups/class_groupAcl.inc @@ -97,8 +97,7 @@ class acl extends plugin $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Removing ACL information failed")); } @@ -194,7 +193,7 @@ class acl extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving ACL information failed")); } diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index c7f5b7b6d..ede18a166 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -838,7 +838,7 @@ class appgroup extends plugin $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Removing application information failed")); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -882,7 +882,7 @@ class appgroup extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving application information failed")); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 5d32a551b..0c3310eb8 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -1,4 +1,5 @@ config->get_ldap_link(); $ldap->rmdir($this->dn); - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Removing group failed")); /* Delete references to object groups */ $ldap->cd ($this->config->current['BASE']); @@ -688,7 +689,7 @@ class group extends plugin $ldap->$mode($this->attrs); $ret= 0; - if (show_ldap_error($ldap->get_error())){ + if (show_ldap_error($ldap->get_error(), _("Saving group failed"))){ $ret= 1; } diff --git a/plugins/admin/groups/class_groupMail.inc b/plugins/admin/groups/class_groupMail.inc index eb103aac3..abde8634b 100644 --- a/plugins/admin/groups/class_groupMail.inc +++ b/plugins/admin/groups/class_groupMail.inc @@ -604,8 +604,7 @@ class mailgroup extends plugin $ldap->cd($this->dn); $ldap->modify ($this->attrs); - - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Removing group mail settings failed")); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -777,8 +776,7 @@ I: Only insider delivery */ $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - - show_ldap_error($ldap->get_error()); + show_ldap_error($ldap->get_error(), _("Saving group mail settings failed")); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){