Code

Added another set of error messages
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 May 2006 09:59:44 +0000 (09:59 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 12 May 2006 09:59:44 +0000 (09:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3314 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_plugin.inc
plugins/addons/addressbook/class_addressbook.inc
plugins/addons/godfs/class_dfsManagment.inc
plugins/admin/fai/class_faiPackage.inc
plugins/admin/fai/class_faiScript.inc
plugins/admin/fai/class_faiTemplate.inc
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofax/faxaccount/class_gofaxAccount.inc

index f9ffda6793430a61e48c062829d0b29626b92acb..15180d73cbd1719b2805435b63ce8ae03a597d83 100644 (file)
@@ -935,6 +935,7 @@ class plugin
         $nattrs['objectClass'][]= "gosaAdministrativeUnitTag";
         $ldap->cd($dn);
         $ldap->modify($nattrs);
+        show_ldap_error($ldap->get_error(), _("Handle object tagging failed"));
       } else {
         @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__, "Not tagging ($tag) $dn - seems to have moved away", "Tagging");
       }
index 0f71b2eac18e89dbc61a36135e29eb30ba2bd506..6ec8948e9ea27a8f9409a71aae1a00e759e84034 100644 (file)
@@ -177,6 +177,7 @@ class addressbook extends plugin
                                /* Delete request is permitted, perform LDAP action */
                                $ldap= $this->config->get_ldap_link();
                                $ldap->rmdir ($this->dn);
+        show_ldap_error($ldap->get_error(), _("Removing addressbook entry failed"));
                                gosa_log ("Address book object'".$this->dn."' has been removed");
 
                        } else {
@@ -647,7 +648,7 @@ class addressbook extends plugin
                $ldap->cd ($this->dn);
     $this->cleanup();
                $ldap->$mode ($this->attrs);
-               if (show_ldap_error($ldap->get_error())){
+               if (show_ldap_error($ldap->get_error(), _("Saving addressbook entry failed"))){
                        return (1);
                }
        }
index 30bbe647c6a5ed537fb24bcb644ab44b387bf177..0d381a1c115fdfe8087e55035cce5c826bd30c20 100644 (file)
@@ -148,7 +148,7 @@ class dfsManagment extends plugin {
       $ldap = $this->config->get_ldap_link();
       $ldap->cd($this->basedn);
       $ldap->rmdir($this->basedn);
-      show_ldap_error($ldap->get_error());
+      show_ldap_error($ldap->get_error(), _("Removing DFS share failed"));
       
       del_lock ($_SESSION['objectinfo']);
       unset ($this->dfstab);
index 43ca39a03b2f0a0bcdabaa2e4e59a24b75a7743c..2a9e4043a31c4864af744d2bfc3aaf607f806d74 100644 (file)
@@ -321,6 +321,7 @@ class faiPackage extends plugin
     $ldap = $this->config->get_ldap_link();
     $ldap->cd ($this->dn);
     $ldap->rmdir_recursive($this->dn);
+    show_ldap_error($ldap->get_error(), _("Removing FAI package base failed"));
     $this->handle_post_events("remove");    
   }
 
@@ -457,11 +458,10 @@ class faiPackage extends plugin
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
     }
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Saving FAI package base failed"));
 
     /* Do object tagging */
     $this->handle_object_tagging();
-    show_ldap_error($ldap->get_error());
     $ldap->cd($this->dn);
 
     /* Save Package configurations */
@@ -503,7 +503,7 @@ class faiPackage extends plugin
           $ldap->cd($pkgdn);
           $ldap->add($pkgattrs);
         }
-        show_ldap_error($ldap->get_error());
+        show_ldap_error($ldap->get_error(), _("Saving FAI package entry failed"));
 
         /* Handle tagging */
         $this->handle_object_tagging($pkgdn, $this->gosaUnitTag);
index 798f63946b8a4bd7dbf153a439f2c308cab01f92..9e3ebcbf0aa6260fa362c2a3eaab3bf93606e3f4 100644 (file)
@@ -300,6 +300,7 @@ class faiScript extends plugin
     $ldap = $this->config->get_ldap_link();
     $ldap->cd ($this->dn);
     $ldap->rmdir_recursive($this->dn);
+    show_ldap_error($ldap->get_error(), _("Removing FAI script base failed"));
     $this->handle_post_events("remove");    
   }
 
@@ -350,11 +351,10 @@ class faiScript extends plugin
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
     }
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Creating FAI script base failed"));
 
     /* Do object tagging */
     $this->handle_object_tagging();
-    show_ldap_error($ldap->get_error());
 
     /* Prepare FAIscriptEntry to write it to ldap
      * First sort array.
@@ -421,6 +421,7 @@ class faiScript extends plugin
         $ldap->cd($sub_dn);
         $ldap->rmdir_recursive($sub_dn);
         $this->handle_post_events("remove");
+        show_ldap_error($ldap->get_error(), _("Removing FAI script failed")); 
       }elseif($obj['status'] == "edited"){
         $ldap->cd($sub_dn);
         $this->cleanup();
@@ -439,11 +440,10 @@ class faiScript extends plugin
         $ldap->cd($sub_dn);
         $ldap->add($tmp); 
         $this->handle_post_events("add");
+        show_ldap_error($ldap->get_error(), _("Saving FAI script failed")); 
       }
-      show_ldap_error($ldap->get_error()); 
 
       $this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
-      show_ldap_error($ldap->get_error());
     }
   }
 }
index a8be5fe48360953a8b36a412e3aa802d03cb082e..8303530f7f0ab934ecd6ec2b64e6ba4c5fbc8195 100644 (file)
@@ -322,11 +322,10 @@ class faiTemplate extends plugin
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
     }
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Saving FAI template base failed"));
 
     /* Do object tagging */
     $this->handle_object_tagging();
-    show_ldap_error($ldap->get_error());
 
     /* Prepare FAIscriptEntry to write it to ldap
      * First sort array.
@@ -384,10 +383,12 @@ class faiTemplate extends plugin
         $ldap->cd($sub_dn);
         $ldap->rmdir_recursive($sub_dn);
         $this->handle_post_events("remove");
+        show_ldap_error($ldap->get_error(), _("Removing FAI template base failed")); 
       }elseif($obj['status'] == "edited"){
         $ldap->cd($sub_dn);
         $this->cleanup();
         $ldap->modify ($tmp); 
+        show_ldap_error($ldap->get_error(), _("Saving FAI template failed")); 
 
         $this->handle_post_events("modify");
       }elseif($obj['status']=="new"){
@@ -400,11 +401,10 @@ class faiTemplate extends plugin
         $ldap->cd($sub_dn);
         $ldap->add($tmp); 
         $this->handle_post_events("add");
+        show_ldap_error($ldap->get_error(), _("Saving FAI template failed")); 
       }
-      show_ldap_error($ldap->get_error()); 
 
       $this->handle_object_tagging($sub_dn, $this->gosaUnitTag);
-      show_ldap_error($ldap->get_error()); 
     }
   }
 }
index cae6f0d639823ed044f989169147c0a9be8cdcfb..e76415709d735899253c12e98182891a522e64d2 100644 (file)
@@ -515,6 +515,7 @@ class blocklist extends plugin
   {
     $ldap= $this->config->get_ldap_link();
     $ldap->rmDir($this->dn);
+    show_ldap_error($ldap->get_error(), _("Removing blocklist object failed"));
     $this->clear_fields();
     $this->handle_post_events("remove");
   }
@@ -621,7 +622,7 @@ class blocklist extends plugin
       $ldap->add($this->attrs);
       $this->handle_post_events("add");
     }
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Saving blocklist object failed"));
   }
 
 
index 961dc6dcd7beca10406a37d106506e8a631492d6..9455b4249f98034d101b23334e250be5349b72ed 100644 (file)
@@ -620,9 +620,9 @@ class gofaxAccount extends plugin
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Removing FAX account failed"));
 
     /* Optionally execute a command after we're done */
     $this->handle_post_events('remove');
@@ -739,9 +739,9 @@ $ldap->modify ($this->attrs);
     $ldap= $this->config->get_ldap_link();
     $ldap->cd($this->dn);
     $this->cleanup();
-$ldap->modify ($this->attrs); 
+    $ldap->modify ($this->attrs); 
 
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Saving FAX account failed"));
 
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){