diff options
Diffstat (limited to 'Zotlabs/Storage')
| -rw-r--r-- | Zotlabs/Storage/Directory.php | 4 | ||||
| -rw-r--r-- | Zotlabs/Storage/File.php | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Zotlabs/Storage/Directory.php b/Zotlabs/Storage/Directory.php index a68fdcf26..35335edcc 100644 --- a/Zotlabs/Storage/Directory.php +++ b/Zotlabs/Storage/Directory.php @@ -866,7 +866,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo $path = $path . '/' . $r[0]['filename']; } if (! $r) { - $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, os_storage, created, edited from attach + $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, is_photo, os_storage, created, edited from attach where folder = '%s' and filename = '%s' and uid = %d $perms order by filename limit 1", dbesc($folder), dbesc(basename($file)), @@ -875,7 +875,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo } if (! $r) { $errors = true; - $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, os_storage, created, edited from attach + $r = q("select id, uid, hash, filename, filetype, filesize, revision, folder, flags, is_dir, is_photo, os_storage, created, edited from attach where folder = '%s' and filename = '%s' and uid = %d order by filename limit 1", dbesc($folder), dbesc(basename($file)), diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 642dd4515..ff3a59b8e 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -93,19 +93,20 @@ class File extends DAV\Node implements DAV\IFile { $x = attach_syspaths($this->auth->owner_id,$this->data['hash']); - $y = q("update attach set display_path = '%s where hash = '%s' and uid = %d", + $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) { + if($this->data['is_photo']) { $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); |
