Code

Updated error handling for Folder updates
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Nov 2010 13:54:18 +0000 (13:54 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 2 Nov 2010 13:54:18 +0000 (13:54 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20173 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/personal/groupware/class_Groupware.inc

index 1e195296baba44ea62675a90bfd93d38f63013e3..1b7440164febff313bf700e236d86be8d67735fa 100644 (file)
@@ -1122,20 +1122,23 @@ class Groupware extends plugin
     function saveFoldersAndAcls($id, $mailFolder)
     {
         // In the tests with the exchange server groupware setting acls is very
-        // slow. So this function has got to be checked for modifications.
+        // slow. So this function has got o be checked for modifications.
+        $res = TRUE;
         foreach($mailFolder as $key => $val)
         {
             if(!empty($val["status"])){
                 switch($val["status"]){
                     case "add":
-                        $this->groupwareDao->save("mailFolder", $id, $key);
+                        $res = $this->groupwareDao->save("mailFolder", $id, $key);
                     break;
                     case "del":
-                        $this->groupwareDao->delete("mailFolder", $id, $key);
+                        $res = $this->groupwareDao->delete("mailFolder", $id, $key);
                     break;
                 }
             }
+            if($res === NULL) return($res);
         }
+        return($res);
     }
 }