summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c0b1c15)
raw | patch | inline | side by side (parent: c0b1c15)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Oct 2010 08:21:26 +0000 (08:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Oct 2010 08:21:26 +0000 (08:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20016 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc b/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderWidget.inc
index 62a272def1a1207802b993b2de4bc33bd5b85b37..5ebb0be28edc4b6a9d1449c27efa364fcc62a924 100644 (file)
<?php
+// Not yet finished need to be reviewed once the folder handling is working.
+
+
class FolderWidget extends plugin
{
public $pathTitle = "Folder";
function __construct(&$config, $folderList, $accountPrefix)
{
$this->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
$entryPath = (empty($entryPath)) ? $name : "{$entryPath}{$separator}{$name}";
$entryBase = $this->pathToDn($entryPath);
+ echo $entryPath."<br>";
+
// 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();
$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();