Code

Updated folder handling for user-groupware accounts.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Oct 2010 08:49:13 +0000 (08:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Oct 2010 08:49:13 +0000 (08:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20042 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index fc409dd867ef013bbbf7f9eedb4ef5cbd709b842..5b4d965ea43cefb584b4e279adbc28a0a15f9920 100644 (file)
@@ -118,7 +118,7 @@ class FolderWidget extends plugin
         $this->buildRecursiveList($arr, $this->pathSeparator);
 
         // Ensure that we've at least the base folder set
-        if(!isset($this->folderList[$this->accountPrefix])){
+        if(!isset($this->folderList['linear'][$this->accountPrefix])){
             $this->addPath($this->accountPrefix, preg_replace("/^.*\//","", $this->accountPrefix));
 
             trigger_error(sprintf("You reuquire at least a folder named '%s'! This time it was added automatically.", 
index d40449a9b4ac2982a4f3240ba48e2102b8ce1723..56422ba679ccf0d15e5637358b53b3bd768a485d 100644 (file)
@@ -303,7 +303,12 @@ class Groupware extends plugin
             }
         }
         if(isset($_POST['configureFolder'])){
-            $this->FolderWidget = new FolderWidget($this->config,$this->mailFolder, $this->folderPrefix);
+            $folders = $this->mailFolder;
+            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;
             $this->FolderWidget->acl_category = $this->acl_category;