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. :-!
This commit is contained in:
Klaus 2015-03-06 00:21:32 +01:00
parent ba49060d0f
commit 2b45bf1908

View File

@ -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'])
);
}