diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-21 10:20:41 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-21 10:20:41 +0100 |
commit | e2814f5d8046329486073294dd1fd588efe5e052 (patch) | |
tree | f6491e4835c152d88eb14e724a05ce34e014d2a5 /Zotlabs/Storage | |
parent | 542d9130b5af8a93736051c1359c17c1d45bd750 (diff) | |
parent | 53445ba6bdd1cde780f4a3d84cbb061cb6b72df9 (diff) | |
download | volse-hubzilla-e2814f5d8046329486073294dd1fd588efe5e052.tar.gz volse-hubzilla-e2814f5d8046329486073294dd1fd588efe5e052.tar.bz2 volse-hubzilla-e2814f5d8046329486073294dd1fd588efe5e052.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Storage')
-rw-r--r-- | Zotlabs/Storage/File.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 37376c177..53d5d3476 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -129,12 +129,16 @@ class File extends DAV\Node implements DAV\IFile { $album = ''; $os_path = ''; - $r = q("SELECT flags, folder, os_storage, os_path, filename, is_photo FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1", + $r = q("SELECT flags, folder, os_storage, os_path, display_path, filename, is_photo FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1", dbesc($this->data['hash']), intval($c[0]['channel_id']) ); if ($r) { + $os_path = $r[0]['os_path']; + $display_path = $r[0]['display_path']; + $filename = $r[0]['filename']; + if (intval($r[0]['os_storage'])) { $d = q("select folder, content from attach where hash = '%s' and uid = %d limit 1", @@ -210,7 +214,7 @@ class File extends DAV\Node implements DAV\IFile { if($is_photo) { require_once('include/photos.php'); - $args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_syspath' => $f, 'os_path' => $os_path, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct ); + $args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_syspath' => $f, 'os_path' => $os_path, 'display_path' => $display_path, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct ); $p = photo_upload($c[0],\App::get_observer(),$args); } |