diff options
author | friendica <info@friendica.com> | 2014-01-10 19:18:30 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-01-10 19:18:30 -0800 |
commit | f125be846c4e0b68bf687eecf12e64512dd40df0 (patch) | |
tree | e23bc84869850caf3ed35eed38f0c83be6258c20 /include | |
parent | ed9a72ecbe95dcb9077ddd49393b5424cfe92910 (diff) | |
download | volse-hubzilla-f125be846c4e0b68bf687eecf12e64512dd40df0.tar.gz volse-hubzilla-f125be846c4e0b68bf687eecf12e64512dd40df0.tar.bz2 volse-hubzilla-f125be846c4e0b68bf687eecf12e64512dd40df0.zip |
DAV put() issues
Diffstat (limited to 'include')
-rw-r--r-- | include/reddav.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/reddav.php b/include/reddav.php index a6c550e2d..d80bcedde 100644 --- a/include/reddav.php +++ b/include/reddav.php @@ -321,13 +321,18 @@ class RedFile extends DAV\Node implements DAV\IFile { function put($data) { logger('RedFile::put: ' . basename($this->name), LOGGER_DEBUG); + + $c = q("select * from channel where channel_id = %d limit 1", + intval($this->auth->owner_id) + ); + $r = q("select flags, data from attach where hash = '%s' and uid = %d limit 1", dbesc($this->data['hash']), intval($c[0]['channel_id']) ); if($r) { if($r[0]['flags'] & ATTACH_FLAG_OS) { - $f = 'store/' . $this->auth->owner_nick . '/' . (($r[0]['data']) ? $r[0]['data'] . '/' : ''); + $f = 'store/' . $this->auth->owner_nick . '/' . (($r[0]['data']) ? $r[0]['data'] : ''); @file_put_contents($f, $data); $size = @filesize($f); logger('reddav: put() filename: ' . $f . ' size: ' . $size, LOGGER_DEBUG); |