aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-10 13:10:50 -0800
committerfriendica <info@friendica.com>2014-01-10 13:10:50 -0800
commitffa86dfea8aef25af8bff9a5ff6342f5b6e7a7c3 (patch)
tree4d51a5416dc2c2551ba92c11248128861396ee91 /include
parent069ea5fee98e1ffcbaaca28fc279a6904e9735e7 (diff)
downloadvolse-hubzilla-ffa86dfea8aef25af8bff9a5ff6342f5b6e7a7c3.tar.gz
volse-hubzilla-ffa86dfea8aef25af8bff9a5ff6342f5b6e7a7c3.tar.bz2
volse-hubzilla-ffa86dfea8aef25af8bff9a5ff6342f5b6e7a7c3.zip
this may fix filesize 0 issues
Diffstat (limited to 'include')
-rw-r--r--include/reddav.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/reddav.php b/include/reddav.php
index 69fcf8bec..a962d1bcc 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -321,15 +321,15 @@ class RedFile extends DAV\Node implements DAV\IFile {
function put($data) {
logger('RedFile::put: ' . basename($this->name), LOGGER_DEBUG);
-
$r = q("select flags, data from attach where hash = '%s' and uid = %d limit 1",
dbesc($hash),
intval($c[0]['channel_id'])
);
if($r) {
if($r[0]['flags'] & ATTACH_FLAG_OS) {
- @file_put_contents($r[0]['data'], $data);
- $size = @filesize($r[0]['data']);
+ $f = 'store/' . $this->auth->owner_nick . '/' . (($r[0]['data']) ? $r[0]['data'] . '/' : '');
+ @file_put_contents($f, $data);
+ $size = @filesize($f);
}
else {
$r = q("update attach set data = '%s' where hash = '%s' and uid = %d limit 1",