From 0499deea6969129bd3b642f2d4edd676e1e5d4c9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 22 Mar 2017 19:31:43 -0700 Subject: more cloud updates - upgrade the DAV structures as well. --- Zotlabs/Storage/File.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Storage/File.php') diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index d2bca3964..1475241ab 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -85,13 +85,23 @@ class File extends DAV\Node implements DAV\IFile { intval($this->data['id']) ); + $x = attach_syspaths($this->auth->owner_id,$this->data['hash']); + + $y = q("update attach set display_path = '%s where hash = '%s' and uid = %d", + dbesc($x['path']), + dbesc($this->data['hash']), + intval($this->auth->owner_id) + ); + if($this->data->is_photo) { - $r = q("update photo set filename = '%s' where resource_id = '%s' and uid = %d", + $r = q("update photo set filename = '%s', display_path = '%s' where resource_id = '%s' and uid = %d", dbesc($newName), + dbesc($x['path']), dbesc($this->data['hash']), intval($this->auth->owner_id) ); } + $ch = channelx_by_n($this->auth->owner_id); if($ch) { $sync = attach_export_data($ch,$this->data['hash']); -- cgit v1.2.3 From d623228cf63d0ebb781e14c73776c96eda2d6a63 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 23 Jul 2017 19:54:32 -0700 Subject: suppress fopen errors from dav --- Zotlabs/Storage/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage/File.php') diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 1475241ab..7a102134f 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -265,7 +265,7 @@ class File extends DAV\Node implements DAV\IFile { $f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $x; else $f = $x; - return fopen($f, 'rb'); + return @fopen($f, 'rb'); } return dbunescbin($r[0]['content']); } -- cgit v1.2.3