aboutsummaryrefslogtreecommitdiffstats
path: root/include/RedDAV
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
committerfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
commit6679734135fb04f4a7beccb81663bf1e9574f062 (patch)
tree887488543d98b5dd297d917718bdd99844e83ba5 /include/RedDAV
parent08b757a22cd2804bfec8ecf682b6987b8c06ca49 (diff)
parentc696860cc53bc25558d83de5eda65d9b583da382 (diff)
downloadvolse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.gz
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.bz2
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.zip
Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
Diffstat (limited to 'include/RedDAV')
-rw-r--r--include/RedDAV/RedBrowser.php11
-rw-r--r--include/RedDAV/RedDirectory.php1
-rw-r--r--include/RedDAV/RedFile.php3
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'])
);
}