diff options
Diffstat (limited to 'include/RedDAV')
-rw-r--r-- | include/RedDAV/RedBrowser.php | 11 | ||||
-rw-r--r-- | include/RedDAV/RedDirectory.php | 1 | ||||
-rw-r--r-- | include/RedDAV/RedFile.php | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php index e651562ec..a0330d7cc 100644 --- a/include/RedDAV/RedBrowser.php +++ b/include/RedDAV/RedBrowser.php @@ -95,6 +95,7 @@ class RedBrowser extends DAV\Browser\Plugin { '{DAV:}getlastmodified', ), 1); + $parent = $this->server->tree->getNodeForPath($path); $parentpath = array(); @@ -167,6 +168,7 @@ class RedBrowser extends DAV\Browser\Plugin { $fullPath = DAV\URLUtil::encodePath('/' . trim($this->server->getBaseUri() . ($path ? $path . '/' : '') . $name, '/')); + $displayName = isset($file[200]['{DAV:}displayname']) ? $file[200]['{DAV:}displayname'] : $name; $displayName = $this->escapeHTML($displayName); @@ -269,18 +271,19 @@ class RedBrowser extends DAV\Browser\Plugin { '$nick' => $this->auth->getCurrentUser() )); - get_app()->page['content'] = $html; - load_pdl(get_app()); + $a = get_app(); + $a->page['content'] = $html; + load_pdl($a); $theme_info_file = "view/theme/" . current_theme() . "/php/theme.php"; if (file_exists($theme_info_file)){ require_once($theme_info_file); if (function_exists(str_replace('-', '_', current_theme()) . '_init')) { $func = str_replace('-', '_', current_theme()) . '_init'; - $func(get_app()); + $func($a); } } - construct_page(get_app()); + construct_page($a); } /** diff --git a/include/RedDAV/RedDirectory.php b/include/RedDAV/RedDirectory.php index 68186d21b..922be378d 100644 --- a/include/RedDAV/RedDirectory.php +++ b/include/RedDAV/RedDirectory.php @@ -49,6 +49,7 @@ class RedDirectory extends DAV\Node implements DAV\ICollection, DAV\IQuota { * @param RedBasicAuth &$auth_plugin */ public function __construct($ext_path, &$auth_plugin) { +// $ext_path = urldecode($ext_path); //logger('directory ' . $ext_path, LOGGER_DATA); $this->ext_path = $ext_path; // remove "/cloud" from the beginning of the path diff --git a/include/RedDAV/RedFile.php b/include/RedDAV/RedFile.php index 9ce6490a7..b7aa5473a 100644 --- a/include/RedDAV/RedFile.php +++ b/include/RedDAV/RedFile.php @@ -80,7 +80,8 @@ class RedFile extends DAV\Node implements DAV\IFile { $newName = str_replace('/', '%2F', $newName); $r = q("UPDATE attach SET filename = '%s' WHERE hash = '%s' AND id = %d", - dbesc($this->data['filename']), + dbesc($newName), + dbesc($this->data['hash']), intval($this->data['id']) ); } |