Code

Updated FolderWidget
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Oct 2010 12:05:56 +0000 (12:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 13 Oct 2010 12:05:56 +0000 (12:05 +0000)
-Fixed baseSelection
-Allow to select root folder, e.g. shared/technik

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20029 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index af296f4f5c5d2dbc763b7d4ab6f4229cab781796..85f56d24fccc8dcd16cd91357ba96b73e5f390cd 100644 (file)
@@ -185,6 +185,11 @@ class FolderWidget extends plugin
                 $entryPath = (empty($entryPath)) ? $pathName : "{$entryPath}{$this->pathSeparator}{$pathName}";
                 $entryBase =  $this->pathToDn($entryPath);
 
+                if(!preg_match("/".preg_quote($this->accountPrefix,'/')."/", $entryPath)){
+                    echo "Skipped {$entryPath} <br>";
+                    continue;
+                }
+
                 // Add eventually missing subFolders, to enable the navigation 
                 //  into these folders via the management lists.
                 if(!isset($current[$entryPath])){
index c1c114656987e52d1a739c9831eef6cb46d90b54..283b8465d01ddc5d7b82477cd87e258cc2ce827f 100644 (file)
@@ -98,7 +98,7 @@ class FolderWidgetListing extends management
      */
     function renderList()
     {
-        $this->folderSelector->setBases($this->getSimpleFolderList($this->folderList['recursive']));
+        $this->folderSelector->setBases($this->getSimpleFolderList($this->folderList['recursive']['/']['children']));
         $this->folderSelector->update(true);
 
         $headpage = $this->getHeadpage();