summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 95c92d6)
raw | patch | inline | side by side (parent: 95c92d6)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 8 Mar 2008 17:22:52 +0000 (17:22 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 8 Mar 2008 17:22:52 +0000 (17:22 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9468 594d385d-05f5-0310-b6e9-bd551577e9d8
67 files changed:
diff --git a/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc b/gosa-plugins/addressbook/addons/addressbook/class_addressbook.inc
index 92c8a3a9d22e3071630c36e3ee35c05fbc087390..76b2a611137f059b4db4bf1280405c22b3b9c88c 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->rmdir ($this->dn);
new log("remove","addressbook/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of addressbook entry '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
new log("remove","addressbook/".get_class($this),$this->dn,array(),"Address book object'".$this->dn."' has been removed");
} else {
$ldap->cd ($this->dn);
$this->cleanup();
$ldap->$mode ($this->attrs);
- if (show_ldap_error($ldap->get_error(), sprintf(_("Removing of addressbook entry '%s' failed."),$this->dn))){
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
return (1);
}
diff --git a/gosa-plugins/connectivity/personal/connectivity/class_intranetAccount.inc b/gosa-plugins/connectivity/personal/connectivity/class_intranetAccount.inc
index e1c9ffca9a423e21d4ba0b2b1848ebe2da060a67..fddfeba42a0abc0df39cced847cc0e76dceeeae1 100644 (file)
/* Log last action */
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/intranet account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->postremove(array("uid"=>$this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/intranet account with dn '%s' failed."),$this->dn));
+ 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->postcreate(array("uid" => $this->uid));
diff --git a/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc b/gosa-plugins/dfs/addons/godfs/class_dfsManagment.inc
index ad1b60fc52caebcc73288a0df755c68fb2693613..5d754aeffbaa65be33e2686bf4120118b1df9815 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->basedn);
$ldap->rmdir($this->basedn);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of DFS share with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->basedn, LDAP_DEL, get_class()));
+ }
del_lock (session::get('objectinfo'));
unset ($this->dfstab);
diff --git a/gosa-plugins/dfs/addons/godfs/class_dfsgeneric.inc b/gosa-plugins/dfs/addons/godfs/class_dfsgeneric.inc
index f787f5f212759992a9c88a7675e9b77f48d9ecb8..4e09f582f5c4ea8cf219a9b22eeafdf48b0b3cc1 100644 (file)
# add
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving dfs/generic with dn '%s' failed."),$this->basedn));
+
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
}
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->basedn);
$ldap->rmdir($this->basedn);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing dfs/generic with dn '%s' failed."),$this->basedn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->basedn, LDAP_DEL, get_class()));
+ }
}
}
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 329d76d8dfd2c0234a60c1b1f6092c1bc2f18678..5feb68fe7bc9dc60208efe3fb97d351d2ae4ebbc 100644 (file)
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()));
+ }
}
}
$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");
/* 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;
}
$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");
$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){
diff --git a/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc b/gosa-plugins/dns/admin/systems/services/dns/class_servDNS.inc
index cddac417daa60a9da858f754a8dbca3ba66563ec..b235712f4513071c9cddb4110e147e0b89c1562a 100644 (file)
$ldap->cd($dn);
$ldap->modify($attrs);
new log("modify","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Updating of system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
}
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
new log("remove","unknown/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
/* Handle Post events */
if(preg_match("/^zoneName=/",$dn)){
if($ldap->fetch()){
$ldap->cd($dn);
$ldap->modify ($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
/* Handle Post events */
if(preg_match("/^zoneName=/",$dn)){
}else{
$ldap->cd($dn);
$ldap->add($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_ADD, get_class()));
+ }
/* Handle Post events */
if(preg_match("/^zoneName=/",$dn)){
$attrs[$flag] = $value;
$this->$flag = $value;
$ldap->modify($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Set status flag for system server/dns with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
$this->action_hook();
}
}
index e6e34b77a33c276fd4d0e32aedba96cabe0d6431..33bc842cb180b9a3b9ce6fb93cd412199aaa9ff6 100644 (file)
$ldap->add($attrs);
}
- show_ldap_error($ldap->get_error(),sprintf(_("Release management failed, can't save '%s'"),$dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, 0, get_class()));
+ }
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiHook.inc b/gosa-plugins/fai/admin/fai/class_faiHook.inc
index e150dc518081a0cace38b995685f8f9b6f893900..c5e8c47dc0fcf1dd6b8c0c16c5fa1c7e60c8f731 100644 (file)
$ldap = $this->config->get_ldap_link();
FAI::prepare_to_save_FAI_object($this->dn,$this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/hook with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
new log("modify","fai/".get_class($this),$this->dn,$this->attributes);
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 9ae6b8e7cc4383d028072e2b7e4f5cb56fe979e5..44cb460fb334ede0b1f6909dc13c9281c567bb09 100644 (file)
}
FAI::prepare_to_save_FAI_object($this->dn,$this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/package list with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
new log("modify","fai/".get_class($this),$this->dn,$this->attributes);
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index 21a4dab5fb7bdb81b933dc569175077af3884383..161deb2c56bdace1c7877eeaa18f4ec1e5448ca9 100644 (file)
$ldap = $this->config->get_ldap_link();
FAI::prepare_to_save_FAI_object($this->dn,$this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/partition table with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
new log("modify","fai/".get_class($this),$this->dn,$this->attributes);
diff --git a/gosa-plugins/fai/admin/fai/class_faiProfile.inc b/gosa-plugins/fai/admin/fai/class_faiProfile.inc
index 5383da68a83264bb63acdfaa8028125cec8796fa..7f337fd803976e13933bda2dfcbfc798513c987e 100644 (file)
new log("create","fai/".get_class($this),$this->dn,$this->attributes);
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/profile with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc
index 33d9e0b3a55685698ea004abba6eded14e838c82..068ac801fbe7ce7b9d7b33be857d7d2bcc5b7489 100644 (file)
$ldap = $this->config->get_ldap_link();
FAI::prepare_to_save_FAI_object($this->dn,$this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Creating of FAI/script with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
new log("modify","fai/".get_class($this),$this->dn,$this->attributes);
diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc
index ffb910eac52dd750a0962ab809cc8951b38b8259..9015ba8789f9e1f853ef3ff95c591cd0a0a77501 100644 (file)
$ldap = $this->config->get_ldap_link();
FAI::prepare_to_save_FAI_object($this->dn,$this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/template with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
new log("modify","fai/".get_class($this),$this->dn,$this->attributes);
diff --git a/gosa-plugins/fai/admin/fai/class_faiVariable.inc b/gosa-plugins/fai/admin/fai/class_faiVariable.inc
index ddd1b1b47d79eac64f41a2b3eb7a7a27752eac08..e13a8f38bfcd64c87972840442481ff34f2f9b17 100644 (file)
$ldap = $this->config->get_ldap_link();
FAI::prepare_to_save_FAI_object($this->dn,$this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of FAI/variable with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
new log("modify","fai/".get_class($this),$this->dn,$this->attributes);
diff --git a/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc b/gosa-plugins/gofax/gofax/blocklists/class_blocklistGeneric.inc
index 7545ee2732b65bb1126cb365f6f34b71d39fc753..0ea12925a243bf00a5ddec9d87b302fd3916d74a 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->rmDir($this->dn);
new log("remove","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of blocklist with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
$this->handle_post_events("remove");
}
new log("create","gofaxlist/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("add");
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of blocklist with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc
index 67a15aab0b3f1dc1d57c2c8c2690cfde01c960af..ff46610246200f0235b0ad4a79581a997e7cf9b4 100644 (file)
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/fax account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events('remove',array("uid"=> $this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/fax account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
diff --git a/gosa-plugins/gofon/admin/ogroups/gofon/class_phonequeue.inc b/gosa-plugins/gofon/admin/ogroups/gofon/class_phonequeue.inc
index 0dd77e3f6a9d140c1a7ba3cbd421259170e69c34..fe9bfed3368fe13614f90e66de3637ca2c6b251c 100644 (file)
new log("modify","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), _("Saving phone queue failed"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
$this->cleanup();
$ldap->modify ($this->attrs);
new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), _("Removing phone queue failed"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
diff --git a/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc b/gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc
index 059f5f50f208c8e2a8296185ba2d30408b34fa3d..cfe9b34f1285be7eec7c565d2b38004c6eb0f02c 100644 (file)
new log("remove","phone/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system phone/generic with dn '%s' failed!"),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
$this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
/* Delete references to object groups */
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save();
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of phone/generic with dn '%s' failed!"),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
diff --git a/gosa-plugins/gofon/admin/systems/services/gofon/class_goFonServer.inc b/gosa-plugins/gofon/admin/systems/services/gofon/class_goFonServer.inc
index c95c6b7334c3562fa069f7d9b4f71bb18383c78f..1f422633ed31852f36c2442e98288215bec2fbde 100644 (file)
foreach($dns as $dn){
$ldap->cd($dn);
$ldap->modify(array("goFonHomeServer" => $this->dn));
- show_ldap_error($ldap->get_error(),sprintf(_("Updating gofon home server failed for '%s'."),$dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
+ }
}
}
diff --git a/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc b/gosa-plugins/gofon/gofon/conference/class_phoneConferenceGeneric.inc
index 8b990a59479236be1d038ecbbedf01856913db73..03ed72b46b1b04df85d65920f9606472ec8ff200 100644 (file)
new log("create","gofonconference/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of goFonConference/generic with dn '%s' failed!"),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->postcreate();
diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacro.inc
index 08f2e0b9cb50521912be04f58e3be325a9c5eb63..509188ff4b9f97e6c7122b3f7267a28cbc0b2d6b 100644 (file)
/* Remove phone macro */
$ldap->rmDir($this->dn);
new log("remove","gofonmacro/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of goFonMacro/generic account with dn '%s' failed!"),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
$og->save ();
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of goFonMacro/generic account with dn '%s' failed!"),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
}
$ldap->add($this->attrs);
$this->handle_post_events("add");
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of goFonMacro/generic account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Log last action */
if($this->initially_was_account){
diff --git a/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc b/gosa-plugins/gofon/gofon/macro/class_gofonMacroParameters.inc
index f963e2df8e744021f6540ddc1344c0a095b5536a..97d8a822b35acf7c37c55384946b0319e06bbef9 100644 (file)
$ldap->add($this->attrs);
$this->handle_post_events("add");
}
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of goFonMacro/generic account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
function PrepareForCopyPaste($source)
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
index 963e595d98ad0d71d93924d265f580373652d67c..30e330337476cf36d63b667d62462efadb77250c 100644 (file)
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/phone account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
$ldap->modify ($this->attrs);
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/phone account with dn '%s' failed."),$this->dn));
+ 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 */
@mysql_close($r_con);
diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index c1e152c2c46a15a6d60ec3de36c5b4338c478f1c..1410422baaa458d03cb8ae9e1b79d4ed2400ef35 100644 (file)
$ldap->rmDir($this->dn);
new log("remove","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of application with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events("remove");
$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));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
}
new log("create","application/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("add");
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of application with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
function set_picture($filename)
diff --git a/gosa-plugins/goto/admin/applications/class_applicationParameters.inc b/gosa-plugins/goto/admin/applications/class_applicationParameters.inc
index d77a98bd83ef6f9055c9e8f3b0b2cf3996684bab..e04c10cdc39a975550312d62aacabacbff78d25d 100644 (file)
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of application parameters with dn '%s' failed."),$this->dn));
+ 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');
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of application parameters with dn '%s' failed."),$this->dn));
+ 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('modify');
diff --git a/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc b/gosa-plugins/goto/admin/devices/class_deviceGeneric.inc
index bc870eb74c6266989d050222c096758c3bbd11c0..eed97d25ddaf077a71951a97712eb1ac39d2ae02 100644 (file)
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error(),_("Device could not be saved."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
diff --git a/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc b/gosa-plugins/goto/admin/groups/apps/class_groupApplication.inc
index 77743284e1dee3fe248b78fab1f74ad353b9c4d6..903f6ce050465e10eb75a65906dfbab102b9ef73 100644 (file)
}
foreach($a_remove as $remove){
$ldap->rmdir_recursive($remove);
- show_ldap_error($ldap->get_error(),
- sprintf(_("Removing of group/application account with dn '%s' failed, could not remove '%s'."),
- $this->dn,$remove));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
}
$this->_load_menu_structure();
}
$ldap->cat($dn);
if($ldap->count()){
$ldap->rmdir_recursive($dn);
- show_ldap_error($ldap->get_error(), _("Could not save group application settings."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_DEL, get_class()));
+ }
}
}
foreach($Actions['Add'] as $dn => $data){
$ldap->cat($dn);
if(!$ldap->count()){
$ldap->add($data);
- show_ldap_error($ldap->get_error(), _("Could not save group application settings."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_DEL, get_class()));
+ }
}
}
foreach($Actions['Edit'] as $dn => $data){
$ldap->cat($dn);
if($ldap->count()){
$ldap->modify($data);
- show_ldap_error($ldap->get_error(), _("Could not save group application settings."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_DEL, get_class()));
+ }
}
}
$this->_load_menu_structure();
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
index eab0bf62b2b54d5dcaec3962e40cd6b9ce9851be..456cf30ba0f06e31994048a27118ce5ef0126761 100644 (file)
$ldap->add($this->attrs);
new log("create","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of mime type/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
plugin::remove_from_parent();
$ldap = $this->config->get_ldap_link();
$ldap->rmDir($this->dn);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of mime type/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
new log("remove","mimetypes/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
/* Optionally execute a command after we're done */
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
$og->save ();
- show_ldap_error($ldap->get_error(), sprintf(_("Removing mime type from objectgroup '%s' failed"), $og->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $og->dn, 0, get_class()));
+ }
}
}
diff --git a/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc b/gosa-plugins/goto/admin/ogroups/goto/class_termgroup.inc
index 4e3338458434a6c5a7169d9078bafa2a373dd65f..2299d1adfa7ff16d61811419c7ae9c1b1d55d1a6 100644 (file)
if(preg_match("/(w|t|s)/i",$allobs[$key]['type'])){
$ldap->cd ($key);
$ldap->modify($attrs);
- show_ldap_error($ldap->get_error(),sprintf(_("Setting action state (FAIstate) failed for object '%s', value was '%s'."),$key,$action));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $key->dn, LDAP_MOD, get_class()));
+ }
}
}
}
$ldap->cd($dn);
$ldap->modify($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic (FAIstate) with dn '%s' failed."),$dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_MOD, get_class()));
}
}
}
if(!$this->didAction){
$this->handle_post_events("modify");
}
- show_ldap_error($ldap->get_error(), _("Saving workstation failed"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_ArpNewDevice.inc b/gosa-plugins/goto/admin/systems/goto/class_ArpNewDevice.inc
index 7bc8128ebd5dae900dc9f10955d76bde91362ce1..455406ae8646d986509e1df276f2be6cd8253cc9 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
$ldap->rmdir_recursive($this->dn);
- show_ldap_error($ldap->get_error(),_("Could not remove arp-alert device after writing dns and dhcp configuration."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $key->dn, LDAP_DEL, get_class()));
+ }
}
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 756b90c9ad664c049cd2032e8a56265f362a1d1e..0b89ef20e84cd1b69bd5e2763d4488cdbdff5026 100644 (file)
new log("remove","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system print/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
$this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
/* Delete references to object groups */
$this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
new log("modify","printer/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system print/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if(preg_match("/printer/i",$this->BelongsTo)){
$this->netConfigDNS->cn = $this->cn;
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index 5d1f47366207fbafeee63989a5c06f3167e34046..7928972f7d3260bdbaa9749405be9e00a9cc511f 100644 (file)
new log("remove","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of object system terminal/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save();
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Send installation activation
*/
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalService.inc
index 043c1920cbaf7dfcd6d2041ee0345d621a9a1854..63fe1fce14b105c05e6f178ddf7524cc7c7bb075 100644 (file)
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error(),_("Could not remove terminal service."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
$ldap->modify ($this->attrs);
new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/service with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
$this->handle_post_events("modify");
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalStartup.inc
index f8289e76b706cf2f9caae8eebb44784706d5ecb7..c0d4a580315ec90a01bf211c2de053becdc99f9e 100644 (file)
new log("modify","terminal/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system terminal/startup with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
$this->handle_post_events("modify");
/* Send ldap configuration update
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
index a103b807b0789f7a8dc0da76f7ca2bcbf4388be4..4a9290e10d9b4116866ff3e1ca78220b6129be4f 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
new log("remove","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system workstation/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events("remove", array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
$ldap->cd($this->dn);
$ldap->add($this->attrs);
new log("create","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
$this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
} else {
if ($this->orig_dn != $this->dn){
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save();
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
if ($activate && class_available("DaemonEvent")){
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationService.inc
index f0a883ce6c9ca784053c8f2a2ae9e35987998616..d10108a2ae59c8cf9ed5642d0afe16f42ac7e17d 100644 (file)
$this->cleanup();
$ldap->modify ($this->attrs);
new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/service with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
$this->handle_post_events("modify");
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index 1fb52f333ed3b226f6f232c9be737ad72c11ef3f..59582f76dc5a0c750d1d06fc90a8dfbc7d3fc564 100644 (file)
$ldap->modify ($this->attrs);
new log("modify","workstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/startup with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
$this->handle_post_events("modify");
/* Check if LDAP server has changed */
diff --git a/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc b/gosa-plugins/goto/admin/systems/services/kiosk/class_goKioskService.inc
index 7b15b7946e7bcd56a343493fca418d9bcaac01cd..f804633f1e0e90b390da8c96698903513dc32e51 100644 (file)
$ldap->cd($this->config->current['BASE']);
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error(),_("Wohl kaum"));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
diff --git a/gosa-plugins/goto/admin/systems/services/ntp/class_goNtpServer.inc b/gosa-plugins/goto/admin/systems/services/ntp/class_goNtpServer.inc
index b179ae95b6830c1dfb991fcece65b060a547ecf4..a13f932b8d73b6d92505b637c77d26b68046bcd8 100644 (file)
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/goNtpServer with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
$this->handle_post_events("modify");
new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
diff --git a/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc b/gosa-plugins/goto/admin/systems/services/shares/class_goShareServer.inc
index 105076c95f085740d253cad566d1c296464504f4..b29744a66d16f0ae30006bb364c44711ef0ef023 100644 (file)
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/shares with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
$this->handle_post_events("modify");
new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
if (count($attrs) == 0) {
$ldap->cd($mountsdn);
$ldap->add($mounts);
- show_ldap_error($ldap->get_error(), sprintf(_("Creating system server/shares (mount container) with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_ADD, get_class()));
+ }
new log("modify","server/".get_class($this),$mountsdn,array_keys($mounts),$ldap->get_error());
}
if (count($attrs) != 0) {
$ldap->rmdir($mountdn);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing system server/shares (mount container) with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $mountdn, LDAP_DEL, get_class()));
+ }
new log("remove","server/".get_class($this),$mountdn,array_keys($mount),$ldap->get_error());
}
}
$mountdn = "cn=".$mount["cn"].","."$mountsdn";
$ldap->cd($mountdn);
$ldap->add($mount);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving system server/shares (mount container) with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $mount, LDAP_ADD, get_class()));
+ }
new log("create","server/".get_class($this),$mountdn,array_keys($mount),$ldap->get_error());
}
}
diff --git a/gosa-plugins/goto/admin/systems/services/terminal/class_goTerminalServer.inc b/gosa-plugins/goto/admin/systems/services/terminal/class_goTerminalServer.inc
index 0dc4184cbdfd793f446fbc450b62960e4154cbdb..463d9a48b6e64c860c3c0a45685284eacfc1be63 100644 (file)
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/terminalServer with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
if($this->initially_was_account){
$this->handle_post_events("modify");
new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc
index 775cd3ed1040a39d90f72932d8247bcc9a202380..deb06944b44abce34030c30d699f4b046a9043ac 100644 (file)
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/environment account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->handle_post_events("remove",array("uid" => $this->uid));
new log("create",$cat."/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/environment account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
$this->handle_post_events($mode,array("uid"=>$this->uid));
}
diff --git a/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc b/gosa-plugins/heimdal/admin/systems/services/kerberos/class_password-methods-heimdal.inc
index 05e9dc568a07d9473745b9c08aed3923fe04be97..bcc87fe19ec99d665e601e94ed3b3458e22ecc29 100644 (file)
$ldap->cat($this->dn,array("dn"));
if($ldap->count()){
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error(),_("Tried to remove heimdal extension."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
}
}
}
}else{
$ldap->modify($data);
}
- show_ldap_error($ldap->get_error(),_("Could not add or update heimdal extensions."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, 0, get_class()));
+ }
}
}
}
diff --git a/gosa-plugins/kolab/admin/systems/services/kolab/class_servKolab.inc b/gosa-plugins/kolab/admin/systems/services/kolab/class_servKolab.inc
index 6e665b66d37807ce789f1a67ecf2d3f2a6368e1e..02a546cfb4ab7190cf04473f8176f25bcc33a3a2 100644 (file)
/* Remove complete entry */
$ldap->rmdir ($this->dn);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing host entry from system server/kolab with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
} else {
/* Only modify kolabHost */
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing host entry from system server/kolab with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
new log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving system server/kolab with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account) {
diff --git a/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc b/gosa-plugins/kolab/personal/connectivity/kolab/class_kolabAccount.inc
index d1d54190e9673aac770e72f022e54d728ef326c0..d4b40b2956b3c291bea1c4db91211d36d785fe70 100644 (file)
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$this->handle_post_events('remove',array("uid" => $this->uid));
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/kolab account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/kolab account with dn '%s' failed."),$this->dn));
+ 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){
diff --git a/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc b/gosa-plugins/mail/admin/groups/mail/class_groupMail.inc
index bd8dbb3e9bce7f9bf38ffd0c67f241441cd41f0e..2b95184f68644ee85bbce67576d55dc324d87de2 100644 (file)
$ldap->cd($this->dn);
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of groups/mail with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
new log("remove","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
$ldap->cd($this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of groups/mail with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
if($this->initially_was_account){
new log("modify","groups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
diff --git a/gosa-plugins/mail/admin/ogroups/mail/class_mailogroup.inc b/gosa-plugins/mail/admin/ogroups/mail/class_mailogroup.inc
index 85aadf3e7a398a080d8fcb7304face237871fd98..ab20b922f644a65a412bb3c0986e5c6f828f1b0c 100644 (file)
new log("create","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of object group/mail with dn '%s' failed."),$this->dn));
+ 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){
new log("remove","ogroups/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of object group/mail with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
}
diff --git a/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc b/gosa-plugins/mail/admin/systems/services/mail/class_goMailServer.inc
index 9180cfa542173d3ce6b1e84758c0b788a7660294..2b89ca8a8320bad0420f14f9b964f91aa513e26b 100644 (file)
$ldap->cd($this->dn);
$ldap->add($this->attrs);
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving server services/mail with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
+
if($this->initially_was_account){
$this->handle_post_events("modify");
new log("modify","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
diff --git a/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServer.inc b/gosa-plugins/mail/admin/systems/services/spam/class_goSpamServer.inc
index 31fe828d0659e9988762e0bcbf12ce2048e020e1..be993d6ca736db84c0973650de34001e6a0a8fb0 100644 (file)
new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/spamassassin with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
function check()
diff --git a/gosa-plugins/mail/admin/systems/services/virus/class_goVirusServer.inc b/gosa-plugins/mail/admin/systems/services/virus/class_goVirusServer.inc
index f91c5f5ae92272aaa9f3113803ae480c0bdccd96..e95b05b12b2463c706d76e48a33312622d7f5f35 100644 (file)
new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/anti virus with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
function check()
diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc
index 2f16c6dd201610d0b95d6ebc9ff0bd0a97235ee7..63cf3260eb5bb7a35c274737c552de1e7cd93c0e 100644 (file)
/* Add "view" to logging class */
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/mail account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
/* Connect to IMAP server for account deletion */
if ($this->gosaMailServer != ""){
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/mail account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
/* Log last action */
if($this->initially_was_account){
diff --git a/gosa-plugins/nagios/personal/nagios/class_nagiosAccount.inc b/gosa-plugins/nagios/personal/nagios/class_nagiosAccount.inc
index 1b7b580e52a95bd3f195fbdf533f1af6f6412efd..9a10451b25a0b8af05ddd8d8d014d217bf69834a 100644 (file)
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/nagios account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
new log("view","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/nagios account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
/* remove the entry from LDAP */
unset ($this->attrs['uid']);
diff --git a/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc b/gosa-plugins/netatalk/personal/netatalk/class_netatalk.inc
index 59b67c257f818eaf0b35d5e142d035e413d30968..d4298095b85b97a68b73c3990c8b8b8c6cd555f9 100644 (file)
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/netatalk account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account) {
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/netatalk account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
/* remove the entry from LDAP */
unset ($this->attrs['uid']);
diff --git a/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc b/gosa-plugins/openxchange/personal/connectivity/openxchange/class_oxchangeAccount.inc
index e7ab39c2a3f3b67f4898b970777af845bb7c43d8..5ff347c9bc89d794412525daeb7c16584a2a1f3f 100644 (file)
if($ldap->dn_exists("ou=addr,".$this->dn)){
$ldap->rmdir_recursive("ou=addr,".$this->dn);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/oxchange addressbook account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
}
$ldap->cd($this->dn);
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/oxchange addressbook account with dn '%s' failed."),$this->dn));
+ 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->postremove(array("uid" => $this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/oxchange account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->postcreate(array("uid" => $this->uid));
if($needupdate){
$ldap->create_missing_trees("ou=addr,".$this->dn);
- show_ldap_error($ldap->get_error(), sprintf(_("Creating of user/oxchange account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
+
/* Finally save data to postgresql server */
pg_set_client_encoding ("UNICODE");
$nv = "SELECT nextval ('serial_id')";
diff --git a/gosa-plugins/phpgw/personal/connectivity/phpgw/class_phpgwAccount.inc b/gosa-plugins/phpgw/personal/connectivity/phpgw/class_phpgwAccount.inc
index 0e2ac36b1fd0d4ce411b765d16b3e72617fed403..51d11f79844076a958bd5853645f3a802d02b7c3 100644 (file)
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPgw account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPgw account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
diff --git a/gosa-plugins/phpscheduleit/personal/connectivity/phpscheduleit/class_phpscheduleitAccount.inc b/gosa-plugins/phpscheduleit/personal/connectivity/phpscheduleit/class_phpscheduleitAccount.inc
index 41454ea7c78af2064dd966d698420824955fea39..521dbf71c5fee28a0af2a1a201178b9817559c11 100644 (file)
$this->attributes, "Save");
$this->cleanup();
$ldap->modify ($this->attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PHPscheduleit account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
if($this->is_account){
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PHPscheduleit account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
diff --git a/gosa-plugins/pptp/personal/connectivity/pptp/class_pptpAccount.inc b/gosa-plugins/pptp/personal/connectivity/pptp/class_pptpAccount.inc
index 0c8c659cf019109b2cb417a748f669faa01571ad..70318d8a91c27bc556ff75b78c385ce4f4610461 100644 (file)
/* Log last action */
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/PPTP account with dn '%s' failed."),$this->dn));
+ 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',array("uid" => $this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/PPTP account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
diff --git a/gosa-plugins/pureftpd/personal/connectivity/pureftpd/class_pureftpdAccount.inc b/gosa-plugins/pureftpd/personal/connectivity/pureftpd/class_pureftpdAccount.inc
index 9dacc059bcdb60886d7eb038f983a6ad6f654290..65927191abe9b98b36297c395dbde1b260a149ba 100644 (file)
/* Log last action */
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/pureftpd account with dn '%s' failed."),$this->dn));
+ 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',array("uid" => $this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/pureftpd account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
diff --git a/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc b/gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc
index a999a1dba4f47cff425cef20ff6105b1ed6c24e2..295698d343f3abb5c2523cc2f12a9f808c4426e7 100644 (file)
$ldap= $this->config->get_ldap_link();
$ldap->rmdir($this->dn);
new log("remove","winworkstation/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system wingeneric/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
$this->handle_post_events("remove");
/* Delete references to object groups */
$this->netConfigDNS->cn = preg_replace("/\\\$\$/","",$this->cn);
$this->netConfigDNS->save();
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system wingeneric/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
$this->postcreate();
diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc
index 0f37c46aeee296972c91042ea63a81e384389ab6..3d0445c7a25748b38606ba26629a61de2331af90 100644 (file)
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/samba account with dn '%s' failed."),$this->dn));
+ 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", array("uid" => $this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/samba account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
diff --git a/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc b/gosa-plugins/scalix/personal/scalix/class_scalixAccount.inc
index 4c83e427dca2ebee74b4c58ce13b98fa8503f2ba..dd00a6e2f2aecfc29ffa6bdf10b127ca35fd21c1 100644 (file)
@DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__,$this->attributes, "Save");
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
+ 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");
/* Save data to LDAP */
$ldap->cd($this->dn);
$ldap->modify($this->attrs);
- show_ldap_error($ldap->get_error());
+ 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){
diff --git a/gosa-plugins/squid/personal/connectivity/squid/class_proxyAccount.inc b/gosa-plugins/squid/personal/connectivity/squid/class_proxyAccount.inc
index 4672365d50809a4fffd79fdf25d9716eb014af53..181b5d4ae40b8793fda64e96af2e6382d93d456d 100644 (file)
/* Log last action */
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/proxy account with dn '%s' failed."),$this->dn));
+ 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",array("uid" => $this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/proxy account with dn '%s' failed."),$this->dn));
+ 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){
diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc
index 5815a4a90ed5cfec54b70cf46eed28ea658a658a..dbd26c814ced2f56530ce1c165686396a2739638 100644 (file)
new log("remove","component/".get_class($this),$this->dn,$this->attributes,$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system component/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
+
$this->handle_post_events(array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
/* Delete references to object groups */
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save();
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system component/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
/* Return plugin informations for acl handling */
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index f3ad76fad63d81014b6552c60dc1257811a6c4fd..54256514aa45a97b13f75a9fa492e67ed995373d 100644 (file)
new log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of system server/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
$mode= "modify";
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/generic with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_DEL, get_class()));
+ }
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save();
diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc
index 25bf4e4b5ab73ffc1337418e37fafb83bd674955..eddac15555d812b643d757942687f34ce3d4c85c 100644 (file)
$ldap->cd($dn);
$ldap->rmdir_recursive($dn);
new log("remove","unknown/".get_class($this),$dn);
- show_ldap_error($ldap->get_error(), sprintf(_("Could not remove dns extension for '%s'."),$dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, LDAP_DEL, get_class()));
+ }
}
}
}
/* DHCP removed */
if($this->initial_dhcp_is_Account && !$this->dhcp_is_Account){
$ldap->rmdir_recursive($this->dhcpHostEntry['dn']);
- show_ldap_error($ldap->get_error(),_("Removing dhcp entry for this object failed."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dhcpHostEntry['dn'], LDAP_DEL, get_class()));
+ }
$tmp = new servdhcp($this->config,$this->dhcpParentNode);
$tmp->handle_post_events("remove");
$tmp = new servdhcp($this->config,$this->dhcpParentNode);
$tmp->handle_post_events("add");
- show_ldap_error($ldap->get_error(),_("Tried to add new dhcp entry failed."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), "cn=".$this->cn.",".$this->dhcpParentNode, LDAP_ADD, get_class()));
+ }
}
/* DHCP still activated */
$tmp = new servdhcp($this->config,$this->dhcpParentNode);
$tmp->handle_post_events("modify");
- show_ldap_error($ldap->get_error(),_("Tried to add new dhcp entry failed."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), "cn=".$this->cn.",".$this->dhcpParentNode, LDAP_ADD, get_class()));
+ }
if($res){
$ldap->rmdir_recursive($this->dhcpHostEntry['dn']);
- show_ldap_error($ldap->get_error(),_("Removing old dhcp entry failed."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dhcpHostEntry['dn'], LDAP_DEL, get_class()));
+ }
}
}
$tmp = new servdhcp($this->config,$this->dhcpParentNode);
$tmp->handle_post_events("modify");
- show_ldap_error($ldap->get_error(),_("Modifying dhcp entry failed."));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dhcpHostEntry['dn'], LDAP_MOD, get_class()));
+ }
}
}
}
/* Display errors
*/
- if($ldap->get_error() != "Success"){
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of terminal/dns account with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $dn, 0, get_class()));
}
$tmp2 = new servdns($this->config,$this->dn);
diff --git a/gosa-plugins/systems/admin/systems/services/class_goService.inc b/gosa-plugins/systems/admin/systems/services/class_goService.inc
index 9c459d938fc6e09a335eea0697f4ecec61e5ba63..7741a1cb046183d393c6811ff0f6655bb46fc937 100644 (file)
new log("remove","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
$this->handle_post_events("remove");
}
$this->handle_post_events("add");
new log("create","server/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ }
}
$attrs[$flag] = $value;
$this->$flag = $value;
$ldap->modify($attrs);
- show_ldap_error($ldap->get_error(), sprintf(_("Set status flag for server services/".get_class($this)." - (".$this->DisplayName.") with dn '%s' failed."),$this->dn));
+ if (!$ldap->success()){
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ }
$this->action_hook();
}
}
diff --git a/gosa-plugins/webdav/personal/connectivity/webdav/class_webdavAccount.inc b/gosa-plugins/webdav/personal/connectivity/webdav/class_webdavAccount.inc
index 4d7c179ded461f579c81029d8f377cf5d72db18f..a16ce246aa278317d232b01c278c6e096ccc81b3 100644 (file)
/* Log last action */
new log("remove","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
- show_ldap_error($ldap->get_error(), sprintf(_("Removing of user/webDAV account with dn '%s' failed."),$this->dn));
+ 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',array("uid" => $this->uid));
new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
- show_ldap_error($ldap->get_error(), sprintf(_("Saving of user/webDAV account with dn '%s' failed."),$this->dn));
+ 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){