Code

(groupware) last checkin broke some things. Repaired primary Mail again... more to...
authorhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 Nov 2010 14:28:03 +0000 (14:28 +0000)
committerhzerres <hzerres@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 22 Nov 2010 14:28:03 +0000 (14:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20320 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index c9914869c9dcbdab6f58c849745c7e597732d794..75a82d4a19c31ec0c7e8d84ea27734f3689d7ce1 100644 (file)
@@ -170,6 +170,10 @@ class FolderWidget extends plugin
             $status = $data['status'];
             $this->addPath($path, $name, $acls, $status);
         }  
+               echo "<pre>";
+               print_r($data);
+               echo "</pre>";
+               
     }
     
 
index bf74a5bc0e8b76e179d62f2857f4e844ed140dbf..f3078002ae8f0c818a1b63ec3d32a22c4d486a96 100644 (file)
@@ -825,6 +825,7 @@ class Groupware extends plugin
 
         // Save the primary Email Address.
         if($this->isFeatureEnabled("primaryMail")&& $this->hasFeaturebeenChanged("primaryMail")){
+               echo "------MailAddress to be saved: ".$this->mailAddress."<br>";
             $res = $this->groupwareDao->save("primaryMail", $this->uid, $this->mailAddress);
             if($res === NULL){
                 $message = _("Setting account mail address failed!");
index 6564396745ef3289f935035c5abdd3a91b99d1d6..3bebc00a62916ddbca8764bfda63940c99cb94a9 100644 (file)
@@ -103,7 +103,14 @@ class GroupwareDao{
         if(is_array($valueArray)){
             $valueArray = array_merge(array($function, $uid), $valueArray);
         }else{
-            $valueArray = array($function, $uid);
+            if(!empty($valueArray)){
+                               //add if single value
+                               $valueArray = array($function, $uid, $valueArray);
+                       }
+                       else{
+                               //omit otherwise
+                               $valueArray = array($function, $uid);
+                       }
         }
                
         $result =  call_user_func_array(array($this->groupwarePluginRef, 'rpcExec'), $valueArray);
@@ -133,13 +140,26 @@ class GroupwareDao{
      * 
      * NOT YET IMPLEMENTED
      */
-    public function del($feature, $uid, $valueArray = null)
+    public function del($feature, $uid, $valueArray = "")
     {
+               //just debugs
+               echo "Feature:".$feature;
+               echo "uid:".$uid;
+               echo "array:".$valueArray;
+       
         $function = GroupwareDao::$gwFeatures[$feature]["delete"];
         if(is_array($valueArray)){
+                       //merge if array
             $valueArray = array_merge(array($function, $uid), $valueArray);
         }else{
-            $valueArray = array($function, $uid);
+                       if(!empty($valueArray)){
+                               //add if single value
+                               $valueArray = array($function, $uid, $valueArray);
+                       }
+                       else{
+                               //omit otherwise
+                               $valueArray = array($function, $uid);
+                       }
         }
                
         $result =  call_user_func_array(array($this->groupwarePluginRef, 'rpcExec'), $valueArray);
@@ -382,10 +402,10 @@ class GroupwareDao{
                     "type"=>"user"
                                        );
                                if(empty($fAcl)){
-                                       $resultArr[$fName]["acls"]["acl"] = GROUPWARE_RIGHTS_NONE;
+                                       $resultArr[$fName]["acls"] = GROUPWARE_RIGHTS_NONE;
                                }
                                else{
-                                       $resultArr[$fName]["acls"]["acl"] = $folderAclDef[$fAcl];
+                                       $resultArr[$fName]["acls"] = $folderAclDef[$fAcl];
                                }
                                $resultArr[$fName]["acls"][] = $aclLine;
                        }