From b98689d2db58ffecc813520140f95273c99c5462 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 29 Jun 2006 11:02:04 +0000 Subject: [PATCH] Updated ldap error msgs to include the object dn git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3986 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/connectivity/class_intranetAccount.inc | 4 ++-- plugins/personal/connectivity/class_kolabAccount.inc | 2 +- plugins/personal/connectivity/class_oxchangeAccount.inc | 8 ++++---- plugins/personal/connectivity/class_phpgwAccount.inc | 4 ++-- .../personal/connectivity/class_phpscheduleitAccount.inc | 4 ++-- plugins/personal/connectivity/class_pptpAccount.inc | 4 ++-- plugins/personal/connectivity/class_proxyAccount.inc | 4 ++-- plugins/personal/connectivity/class_pureftpdAccount.inc | 4 ++-- plugins/personal/connectivity/class_webdavAccount.inc | 4 ++-- plugins/personal/environment/class_environment.inc | 4 ++-- plugins/personal/generic/class_user.inc | 4 ++-- plugins/personal/mail/class_mailAccount.inc | 4 ++-- plugins/personal/nagios/class_nagiosAccount.inc | 4 ++-- plugins/personal/netatalk/class_netatalk.inc | 4 ++-- plugins/personal/posix/class_posixAccount.inc | 4 ++-- plugins/personal/samba/class_sambaAccount.inc | 4 ++-- 16 files changed, 33 insertions(+), 33 deletions(-) diff --git a/plugins/personal/connectivity/class_intranetAccount.inc b/plugins/personal/connectivity/class_intranetAccount.inc index d891007ed..5f55a3f22 100644 --- a/plugins/personal/connectivity/class_intranetAccount.inc +++ b/plugins/personal/connectivity/class_intranetAccount.inc @@ -99,7 +99,7 @@ class intranetAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing intranet account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/intranet account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->postremove(); @@ -154,7 +154,7 @@ class intranetAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving intranet account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/intranet account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->postcreate(); diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc index 16e23b9fa..389bc753d 100644 --- a/plugins/personal/connectivity/class_kolabAccount.inc +++ b/plugins/personal/connectivity/class_kolabAccount.inc @@ -322,7 +322,7 @@ class kolabAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving Kolab account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/kolav account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc index 6104d2574..36db420f9 100644 --- a/plugins/personal/connectivity/class_oxchangeAccount.inc +++ b/plugins/personal/connectivity/class_oxchangeAccount.inc @@ -733,7 +733,7 @@ class oxchangeAccount extends plugin if($ldap->dn_exists("ou=addr,".$this->dn)){ $ldap->rmdir_recursive("ou=addr,".$this->dn); - show_ldap_error($ldap->get_error(), _("Removing of oxchange addressbook failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/oxchange addressbook account with dn '%s' failed."),$this->dn)); } $ldap->cd($this->dn); @@ -741,7 +741,7 @@ class oxchangeAccount extends plugin $this->attributes, "Save"); $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing oxchange account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/oxchange addressbook account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->postremove(); @@ -834,14 +834,14 @@ class oxchangeAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving of oxchange account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/oxchange account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->postcreate(); if($needupdate){ $ldap->create_missing_trees("ou=addr,".$this->dn); - show_ldap_error($ldap->get_error(), _("Creating oxchange addressbook tree failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Creating of user/oxchange account with dn '%s' failed."),$this->dn)); /* Finally save data to postgresql server */ pg_set_client_encoding ("UNICODE"); $nv = "SELECT nextval ('serial_id')"; diff --git a/plugins/personal/connectivity/class_phpgwAccount.inc b/plugins/personal/connectivity/class_phpgwAccount.inc index b70991a96..37162cea9 100644 --- a/plugins/personal/connectivity/class_phpgwAccount.inc +++ b/plugins/personal/connectivity/class_phpgwAccount.inc @@ -69,7 +69,7 @@ class phpgwAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing PHPgw account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPgw account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -112,7 +112,7 @@ class phpgwAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving PHPgw account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPgw account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/personal/connectivity/class_phpscheduleitAccount.inc b/plugins/personal/connectivity/class_phpscheduleitAccount.inc index 63536b2c3..9bbb7de4e 100644 --- a/plugins/personal/connectivity/class_phpscheduleitAccount.inc +++ b/plugins/personal/connectivity/class_phpscheduleitAccount.inc @@ -80,7 +80,7 @@ class phpscheduleitAccount extends plugin $this->attributes, "Save"); $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing PHPscheduleit account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPscheduleit account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -121,7 +121,7 @@ class phpscheduleitAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving PHPscheduleit account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPscheduleit account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/personal/connectivity/class_pptpAccount.inc b/plugins/personal/connectivity/class_pptpAccount.inc index 04ea2390c..266e70caa 100644 --- a/plugins/personal/connectivity/class_pptpAccount.inc +++ b/plugins/personal/connectivity/class_pptpAccount.inc @@ -81,7 +81,7 @@ class pptpAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing PPTP account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PPTP account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -124,7 +124,7 @@ class pptpAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving PPTP account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PPTP account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index de1cc587b..ff407a20e 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -153,7 +153,7 @@ class proxyAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing proxy account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/proxy account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -259,7 +259,7 @@ class proxyAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving proxy account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/proxy account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/personal/connectivity/class_pureftpdAccount.inc b/plugins/personal/connectivity/class_pureftpdAccount.inc index aa55f5d26..1b189109b 100644 --- a/plugins/personal/connectivity/class_pureftpdAccount.inc +++ b/plugins/personal/connectivity/class_pureftpdAccount.inc @@ -93,7 +93,7 @@ class pureftpdAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing pureftpd account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/pureftpd account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -172,7 +172,7 @@ class pureftpdAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving pureftpd account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/pureftpd account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/personal/connectivity/class_webdavAccount.inc b/plugins/personal/connectivity/class_webdavAccount.inc index ba0c5ec20..a438837c9 100644 --- a/plugins/personal/connectivity/class_webdavAccount.inc +++ b/plugins/personal/connectivity/class_webdavAccount.inc @@ -65,7 +65,7 @@ class webdavAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing webDAV account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/webDAV account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events('remove'); @@ -108,7 +108,7 @@ class webdavAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving webDAV account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/webDAV account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 0fd801e1a..5b5881132 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -829,7 +829,7 @@ class environment extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing environment information failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/environment account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -1173,7 +1173,7 @@ $ldap->modify ($attrs); $ldap->cd($this->dn); $this->cleanup(); $ldap->$mode($this->attrs); - show_ldap_error($ldap->get_error(), _("Adding environment information failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/environment account with dn '%s' failed."),$this->dn)); $this->handle_post_events($mode); } diff --git a/plugins/personal/generic/class_user.inc b/plugins/personal/generic/class_user.inc index ec56ed885..2d67d8d59 100644 --- a/plugins/personal/generic/class_user.inc +++ b/plugins/personal/generic/class_user.inc @@ -543,7 +543,7 @@ class user extends plugin { $ldap= $this->config->get_ldap_link(); $ldap->rmdir ($this->dn); - show_ldap_error($ldap->get_error(), _("Removing generic user account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/generic account with dn '%s' failed."),$this->dn)); /* Delete references to groups */ $ldap->cd ($this->config->current['BASE']); @@ -832,7 +832,7 @@ class user extends plugin $this->cleanup(); $ldap->cd ($this->dn); $ldap->$mode ($this->attrs); - if (show_ldap_error($ldap->get_error(), _("Saving generic user account failed"))){ + if (show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/generic account with dn '%s' failed."),$this->dn))){ return (1); } diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 2ade42931..db93e3005 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -613,7 +613,7 @@ class mailAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing mail account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/mail account with dn '%s' failed."),$this->dn)); /* Connect to IMAP server for account deletion */ if ($this->gosaMailServer != ""){ @@ -717,7 +717,7 @@ class mailAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving mail account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/mail account with dn '%s' failed."),$this->dn)); /* Only do IMAP actions if we are not a template */ if (!$this->is_template){ diff --git a/plugins/personal/nagios/class_nagiosAccount.inc b/plugins/personal/nagios/class_nagiosAccount.inc index fc6e04899..482cd1cb3 100644 --- a/plugins/personal/nagios/class_nagiosAccount.inc +++ b/plugins/personal/nagios/class_nagiosAccount.inc @@ -144,7 +144,7 @@ class nagiosAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving nagios account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/nagios account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ @@ -223,7 +223,7 @@ class nagiosAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing nagios account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/nagios account with dn '%s' failed."),$this->dn)); /* remove the entry from LDAP */ unset ($this->attrs['uid']); diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc index 7e66f6ce8..ab353001c 100644 --- a/plugins/personal/netatalk/class_netatalk.inc +++ b/plugins/personal/netatalk/class_netatalk.inc @@ -253,7 +253,7 @@ class netatalk extends plugin { $this->cleanup(); $ldap->modify($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving Netatalk account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/netatalk account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account) { @@ -313,7 +313,7 @@ class netatalk extends plugin { $this->cleanup(); $ldap->modify($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing Netatalk account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/netatalk account with dn '%s' failed."),$this->dn)); /* remove the entry from LDAP */ unset ($this->attrs['uid']); diff --git a/plugins/personal/posix/class_posixAccount.inc b/plugins/personal/posix/class_posixAccount.inc index 758ea14d8..a924ebf58 100644 --- a/plugins/personal/posix/class_posixAccount.inc +++ b/plugins/personal/posix/class_posixAccount.inc @@ -601,7 +601,7 @@ class posixAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing UNIX account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/posix account with dn '%s' failed."),$this->dn)); /* Delete group only if cn is uid and there are no other members inside */ @@ -823,7 +823,7 @@ class posixAccount extends plugin unset($this->attrs['uid']); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving UNIX account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/posix account with dn '%s' failed."),$this->dn)); /* Remove lock needed for unique id generation */ del_lock ("uidnumber"); diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 31721d67b..f33d5e816 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -624,7 +624,7 @@ class sambaAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Removing Samba account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/samba account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ $this->handle_post_events("remove"); @@ -971,7 +971,7 @@ class sambaAccount extends plugin $this->cleanup(); $ldap->modify ($this->attrs); - show_ldap_error($ldap->get_error(), _("Saving Samba account failed")); + show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/samba account with dn '%s' failed."),$this->dn)); /* Optionally execute a command after we're done */ if ($this->initially_was_account == $this->is_account){ -- 2.30.2