aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-10 13:47:56 -0800
committerfriendica <info@friendica.com>2014-01-10 13:47:56 -0800
commit0ce3e7235af16f13ab3101a09ae39006aa64cb7e (patch)
tree24557639edc5bb871a802b4de7c57b1d3d8505f0
parentdaec9b876755f9f724d49856b8df13092258e7e5 (diff)
downloadvolse-hubzilla-0ce3e7235af16f13ab3101a09ae39006aa64cb7e.tar.gz
volse-hubzilla-0ce3e7235af16f13ab3101a09ae39006aa64cb7e.tar.bz2
volse-hubzilla-0ce3e7235af16f13ab3101a09ae39006aa64cb7e.zip
other reddav issues, but probably won't fix the empty file
-rw-r--r--include/reddav.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/reddav.php b/include/reddav.php
index a962d1bcc..a6c550e2d 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -322,7 +322,7 @@ class RedFile extends DAV\Node implements DAV\IFile {
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),
+ dbesc($this->data['hash']),
intval($c[0]['channel_id'])
);
if($r) {
@@ -330,6 +330,7 @@ class RedFile extends DAV\Node implements DAV\IFile {
$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);
}
else {
$r = q("update attach set data = '%s' where hash = '%s' and uid = %d limit 1",
@@ -348,7 +349,7 @@ class RedFile extends DAV\Node implements DAV\IFile {
$r = q("update attach set filesize = '%s' where hash = '%s' and uid = %d limit 1",
dbesc($size),
- dbesc($hash),
+ dbesc($this->data['hash']),
intval($c[0]['channel_id'])
);
@@ -356,7 +357,7 @@ class RedFile extends DAV\Node implements DAV\IFile {
$maxfilesize = get_config('system','maxfilesize');
if(($maxfilesize) && ($size > $maxfilesize)) {
- attach_delete($c[0]['channel_id'],$hash);
+ attach_delete($c[0]['channel_id'],$this->data['hash']);
return;
}
@@ -366,7 +367,7 @@ class RedFile extends DAV\Node implements DAV\IFile {
intval($c[0]['channel_account_id'])
);
if(($x) && ($x[0]['total'] + $size > $limit)) {
- attach_delete($c[0]['channel_id'],$hash);
+ attach_delete($c[0]['channel_id'],$this->data['hash']);
return;
}
}