Code

Added folder prefix variable which allows to use the folder editor
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 14:52:13 +0000 (14:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 12 Oct 2010 14:52:13 +0000 (14:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20007 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index f31eac726dd5c6ecdc6e91695e09cc5d734d9e73..5278415b824c0178b791513a0f292a1f6ac408b6 100644 (file)
@@ -105,6 +105,9 @@ class Groupware extends plugin
     var $dropOwnMails = FALSE;
     var $groupwareDao = null;
 
+    // Used in the folder editor as the starting folder, usually user/username
+    var $folderPrefix = "";
+
     /*! \brief      
      */
     function __construct ($config, $dn= NULL)
@@ -116,6 +119,9 @@ class Groupware extends plugin
             $this->uid = $this->attrs['uid'][0];
         }
 
+        // Set initial folder prefix
+        $this->folderPrefix = "user/{$this->uid}";
+
                // Initialize file browser list
                $this->fileBrowser= new sortableListing();
                $this->fileBrowser->setDeleteable(TRUE);
@@ -337,7 +343,7 @@ class Groupware extends plugin
             }
         }
         if(isset($_POST['configureFolder'])){
-            $this->FolderWidget = new FolderWidget($this->config,$this->mailFolder, "user/wiwu/Inbox");
+            $this->FolderWidget = new FolderWidget($this->config,$this->mailFolder, $this->folderPrefix);
             $this->FolderWidget->setPermissions($this->getPermissions());
             $this->FolderWidget->acl_base = $this->acl_base;
             $this->FolderWidget->acl_category = $this->acl_category;