Code

Updated shared folder handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Oct 2010 09:57:40 +0000 (09:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Oct 2010 09:57:40 +0000 (09:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20023 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/groupware/admin/groups/GroupwareSharedFolder/class_GroupwareSharedFolder.inc

index 88c6311e3fb6ea4e503229e8ae22c1f98f326228..9c5899f2c039c31990c3015d4112542b4d24dc4f 100644 (file)
@@ -117,7 +117,7 @@ class GroupwareSharedFolder extends plugin
             if(!$rpc->success()){
                 $this->rpcError = TRUE;
                 $this->rpcErrorMessage = $rpc->get_error();
-                $message = sprintf(_("Failed to folder list! Error was: '%s'."), 
+                $message = sprintf(_("Failed to load folder list! Error was: '%s'."), 
                         $rpc->get_error());
                 msg_dialog::display(_("Error"),msgPool::rpcError($message), ERROR_DIALOG);
                 return;
@@ -134,7 +134,17 @@ class GroupwareSharedFolder extends plugin
                     $entry = array();
                     $entry['name'] = $name;
                     $entry['status'] = '';
-                    $entry['acls'] = array();
+
+                    $acls = $rpc->gwFolderGetMembers($path);
+                    if(!$rpc->success()){
+                        $this->rpcError = TRUE;
+                        $this->rpcErrorMessage = $rpc->get_error();
+                        $message = sprintf(_("Failed to load permissions for folder '%s'! Error was: '%s'."), 
+                                $path,$rpc->get_error());
+                        msg_dialog::display(_("Error"),msgPool::rpcError($message), ERROR_DIALOG);
+                        return;
+                    }
+                    $entry['acls'] = $acls;
                     $folderList[$path] = $entry;
                 }
             }
@@ -150,8 +160,6 @@ class GroupwareSharedFolder extends plugin
             $folderList[$this->folderPrefix] = $intialFolderEntry;
         }
 
-        print_a(array("--------" => $folderList));
-
         // Store values as current and initial values (saved_attributes) 
         //  to be able to keep track och changes.
         $this->is_account = $this->initially_was_account = $is_account;
@@ -276,9 +284,8 @@ class GroupwareSharedFolder extends plugin
      */  
     function save()
     {
-        print_a($this->folderList);
-        print_a($this->saved_attributes['folderList']);
-
+        print_a(array('current' => $this->folderList));
+        print_a(array('old' => $this->saved_attributes['folderList']));
     }