From: hickert Date: Wed, 13 Oct 2010 08:21:26 +0000 (+0000) Subject: Updated the folder Widget X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3a6213a055cff6ae364a94017982cd6bed3a8b30;p=gosa.git Updated the folder Widget git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20016 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 62a272def..5ebb0be28 100644 --- a/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc +++ b/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc @@ -1,5 +1,8 @@ config = $config; + // The rootBase is a dn-like representation of the root path // e.g. rootPath is '/' then is the rootBase 'cn=/' // These are just internally used variables and should not have an @@ -107,9 +111,11 @@ class FolderWidget extends plugin $entryPath = (empty($entryPath)) ? $name : "{$entryPath}{$separator}{$name}"; $entryBase = $this->pathToDn($entryPath); + echo $entryPath."
"; + // Add eventually missing subFolders, to enable the navigation // into these folders via the management lists. - if(preg_match("/^".preg_quote($this->accountPrefix,'/')."/", $entryPath)){ + if(preg_match("/^".preg_quote($this->accountPrefix,'/').$this->accountPrefix, $entryPath)){ if(!isset($current[$entryPath])){ $current[$entryPath] = array(); $current[$entryPath]['children'] = array(); @@ -253,7 +259,8 @@ class FolderWidget extends plugin $path = $entry['path']; $newItem = $this->dialog->save(); $name = $newItem['name']; - $newPath = "{$path}{$this->pathSeparator}{$name}"; + $newPath = rtrim($path,$this->pathSeparator).$this->pathSeparator.$name; + $newItem['status'] = 'added'; $newItem['type'] = 'real'; $newItem['children'] = array();