summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dd740ba)
raw | patch | inline | side by side (parent: dd740ba)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 14:15:37 +0000 (14:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 14:15:37 +0000 (14:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19939 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc b/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc
index e51f4c09eaa95ce959ab811b7b2c06081c244fe5..4a4541eeba9686dc828a883fde4129461c21953d 100644 (file)
class FolderWidget extends plugin
{
+
+ private $pathSeperator = "/";
+ private $rootName = "/";
+ private $fakeCnAttr = "cn=";
+ private $rootBase = "";
+
public $config;
private $FolderWidgetListing = NULL;
private $folderList;
function __construct(&$config)
{
- $this->FolderWidgetListing = new FolderWidgetListing($this->config, get_userinfo());
+ $this->rootBase = $this->fakeCnAttr.$this->rootName;
+ $this->FolderWidgetListing = new FolderWidgetListing($this->config, get_userinfo(), $this->rootBase);
+ $this->FolderWidgetListing->setBase($this->rootBase);
+ $this->FolderWidgetListing->setFolderRoot($this->rootBase);
+
+
}
*/
function setFolderList($arr)
{
- $this->folderList = $this->buildRecursiveList($arr, '/');
- $this->FolderWidgetListing->setBase('cn=/');
- $this->FolderWidgetListing->setFolderRoot('cn=/');
+ $this->folderList = $this->buildRecursiveList($arr, $this->pathSeperator);
}
$ret = array();
// Add root Entry
- $data['cn=/'] = array();
- $data['cn=/']['name'] = '/';
- $data['cn=/']['status'] = '';
- $data['cn=/']['path'] = '/';
- $data['cn=/']['type'] = 'manual';
- $data['cn=/']['base'] = 'cn=/';
- $data['cn=/']['children'] = array();
- $ret['linear']['cn=/'] = &$data['cn=/'];
-
- $base = &$data['cn=/']['children'];
+ $data[$this->rootBase] = array();
+ $data[$this->rootBase]['name'] = $this->rootName;
+ $data[$this->rootBase]['status'] = '';
+ $data[$this->rootBase]['path'] = $this->rootName;
+ $data[$this->rootBase]['type'] = 'manual';
+ $data[$this->rootBase]['base'] = $this->rootBase;
+ $data[$this->rootBase]['children'] = array();
+ $ret['linear'][$this->rootBase] = &$data[$this->rootBase];
+
+ $base = &$data[$this->rootBase]['children'];
$last = NULL;
foreach($arr as $path => $entry){
$current = &$base;
$pathSteps = preg_split("/".preg_quote($seperator,'/')."/", $path);
$entryPath = "";
- $entryBase = "cn=/";
+ $entryBase = $this->rootBase;
foreach($pathSteps as $name){
$entryPath = (empty($entryPath)) ? $name : "{$entryPath}{$seperator}{$name}";
$entryBase = trim("cn={$name},{$entryBase}", ' ,');
diff --git a/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidgetListing.inc b/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidgetListing.inc
index 2460a99528282c0c55ae3a41170a5fcb1773d05b..14bdf17fe8f40a62b0613d399ac99a8f6b5f6e58 100644 (file)
private $folderSelector = NULL;
private $folderList = array();
- private $rootBase = 'cn=/';
+ private $rootBase = '';
- function __construct($config,$ui)
+ function __construct($config,$ui, $rootBase)
{
$this->config = $config;
$this->ui = $ui;
$this->storagePoints = array("");
+ $this->rootBase = $rootBase;
// Build filter
if (FALSE && session::global_is_set(get_class($this)."_filter")){