From 2b45bf190869f8ad489c2f0e82597b7ffb315f0f Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 6 Mar 2015 00:21:32 +0100 Subject: RedDAV: fix renaming files. How can no one have spot this bug yet?!? Is no one using WebDAV? Took me 2 days to figure out it was not my RedDAV rewrite, but that this should have never worked. :-! --- include/RedDAV/RedFile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/RedDAV/RedFile.php') 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']) ); } -- cgit v1.2.3