From: hickert Date: Fri, 8 Oct 2010 07:53:07 +0000 (+0000) Subject: Added save method to filter widget X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b5f118d85ff4af0d8f48f7e8e0b53f31d95ff63c;p=gosa.git Added save method to filter widget git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19947 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 2f8e122f6..65c4875e1 100644 --- a/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc +++ b/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc @@ -55,6 +55,7 @@ class FolderWidget extends plugin $data[$this->rootBase] = array(); $data[$this->rootBase]['name'] = $this->rootName; $data[$this->rootBase]['status'] = ''; + $data[$this->rootBase]['acls'] = array(); $data[$this->rootBase]['path'] = $this->rootName; $data[$this->rootBase]['type'] = 'manual'; $data[$this->rootBase]['base'] = $this->rootBase; @@ -80,6 +81,7 @@ class FolderWidget extends plugin $current[$entryPath]['name'] = $name; $current[$entryPath]['path'] = $path; $current[$entryPath]['status'] = ''; + $current[$entryPath]['acls'] = array(); $current[$entryPath]['type'] = 'manual'; $current[$entryPath]['base'] = $entryBase; $current[$entryPath]['parentPath'] = $entryPath; @@ -102,6 +104,29 @@ class FolderWidget extends plugin } + function _saveRecursive($arr) + { + $ret = array(); + foreach($arr as $path => $item){ + if($item['type'] == 'real'){ + $ret[$path] = array( + 'name' => $item['name'], + 'status' => $item['status'], + 'acls' => $item['acls'], + ); + } + if(isset($item['children']) && count($item['children'])){ + $ret = array_merge($ret, $this->_saveRecursive($item['children'])); + } + } + return($ret); + } + + function save() + { + return($this->_saveRecursive($this->folderList['recursive'])); + } + function execute() { session::set('FolderWidgetListing::folderList', $this->folderList);