summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c8b562)
raw | patch | inline | side by side (parent: 8c8b562)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 14:02:59 +0000 (14:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 14:02:59 +0000 (14:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19936 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 904714ff74997c07458b6087c4cc9ab977a8d6e9..e51f4c09eaa95ce959ab811b7b2c06081c244fe5 100644 (file)
function buildRecursiveList($arr, $seperator)
{
$data = array();
- $base = &$data;
- $last = NULL;
$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'];
+ $last = NULL;
foreach($arr as $path => $entry){
$current = &$base;
$pathSteps = preg_split("/".preg_quote($seperator,'/')."/", $path);
-
$entryPath = "";
$entryBase = "cn=/";
foreach($pathSteps as $name){
$current[$entryPath]['status'] = '';
$current[$entryPath]['type'] = 'manual';
$current[$entryPath]['base'] = $entryBase;
-
$ret['linear'][$entryPath] = &$current[$entryPath];
-
$this->baseEntryMap[$entryBase] = $entryPath;
}
$last = &$current[$entryPath];
$last['name'] = $entry['name'];
$last['type'] = 'real';
$last['status'] = $entry['status'];
-
$ret['linear'][$path] = &$last;
-
}
$ret['recursive'] = $data;
return($ret);
diff --git a/gosa-plugins/groupware/personal/groupware/FolderWidget/class_filterFolderWidget.inc b/gosa-plugins/groupware/personal/groupware/FolderWidget/class_filterFolderWidget.inc
index 17af6b550bbac1a9c46a485604da6913ce4ddb63..aba8249bfad6f7de686ef800b587eb01f3134efa 100644 (file)
// Detect starting position in folder tree.
$items = $data['recursive'];
+ $parent = NULL;
foreach($data['linear'] as $item){
if($item['base'] == $base){
$items = $item['children'];
+ break;
}
+ $parent = $item;
}
// Add entries