Code

(groupware) incorporated the folder and folder rights.
authorhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Oct 2010 14:51:35 +0000 (14:51 +0000)
committerhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Oct 2010 14:51:35 +0000 (14:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20162 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 01141cd9c6d5caed0019566e38ecf6a4dc65e697..3d2206dc8361799555e5bd883ba9c9658dd21fda 100644 (file)
@@ -241,9 +241,6 @@ class Groupware extends plugin
      */
     function execute()
     {
-               echo "execute <pre>";
-               print_r($_POST);
-               echo "</pre>";
         // Register plugin execution 
         $display = plugin::execute();
 
@@ -318,7 +315,6 @@ class Groupware extends plugin
             if(!isset($folders[$this->folderPrefix])){
                 $folders[$this->folderPrefix] = array('name' => $this->uid,'status' => 'added','acls' => array());
             }
-
             $this->FolderWidget = new FolderWidget($this->config,$folders, $this->folderPrefix);
             $this->FolderWidget->setPermissions(GroupwareDefinitions::getPermissions());
             $this->FolderWidget->acl_base = $this->acl_base;
@@ -529,7 +525,6 @@ class Groupware extends plugin
      */    
     function save_object()
     {
-               echo "save Object";
         if(isset($_POST['groupwarePluginPosted'])){
 
             // We ran into a communication error with the backend. 
@@ -855,7 +850,7 @@ class Groupware extends plugin
                        if(!$this->mailLimitSendEnabled){
                                $this->mailLimitSendValue = 0;
                        }
-                       $this->groupwareDao->save("mailLimit", $this->uid, array( "send"=>$this->mailLimitSendValue, "receive"=>$this->mailLimitReceiveValue));
+                       $this->groupwareDao->save("mailLimit", $this->uid, array( $this->mailLimitSendValue, $this->mailLimitReceiveValue));
                }
                if($this->isFeatureEnabled("vacationMessage")&& $this->hasFeaturebeenChanged("vacationMessage")){
                        if($this->vacationEnabled){
index 5b6751be4bd056f83e89e38756514696a8eb2061..210370fcf951e6632bf637c0e02aa65b730bd321 100644 (file)
@@ -61,7 +61,6 @@ class GroupwareDao{
                        "mailLimit" => array("get"=>"gwAcctGetMailLimit",
                     "save"=>"gwAcctSetMailLimit")
                 );
-                       
 
 
     /*! \brief Constructor sets the connection to the rpc service 
@@ -185,7 +184,38 @@ class GroupwareDao{
                        //Folder Id from the User ...
                        //user/$id/
                        $resultArr["mailFolder"] = $this->get("mailFolder", array("user/".$uid."/"));
-                       print_a($resultArr["mailFolder"]);
+                       
+                       foreach($resultArr["mailFolder"] as $val){
+                               $s = strpos($val, "user/");
+                               if($s == 0){
+                               
+                                       $resultArr["mailFolder"][$val]["name"] = substr($val, strpos($val, "/", 5));
+                                       
+                                       $curAcl = $this->get("private_folderACLS", array("user/wiwu/Posteingang"));
+                                       if(is_array($curAcl)){
+                                               foreach($curAcl as $aclkey => $aclval){
+                                                       
+                                                       if (empty($aclkey)){
+                                                               $resultArr["mailFolder"][$val]["acls"][] = array( 
+                                               "name" => $aclkey, 
+                                               "acl"  => aclval,  
+                                               "type"=>"user");
+                                                       }
+                                                       else{
+                                                               $resultArr["mailFolder"][$val]["acls"][] = array( 
+                                               "name" => $aclkey, 
+                                               "acl"  => GROUPWARE_RIGHTS_NONE,  
+                                               "type"=>"user");
+                                                       }
+                                               }
+                                       }
+                               }
+                               else{
+                                       // this case should never happen - unsetting the array anyway.
+                                       unset($resultArr["mailFolder"][$val]);
+                               }
+                       }
+                       
                        /*
                        "RIGHTS_NONE", 0);
                        "RIGHTS_READ",  LOOKUP | READ | STATUS);