diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-11 21:35:56 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-11 21:35:56 +0100 |
commit | bd3bc503edc9fd5035ed54070b0adf8760e402fa (patch) | |
tree | 0a4cbac294969ebc374e633488598beff8fde752 /Zotlabs | |
parent | 823729d2c1ea202a463c645d3a84ebf35140bd9f (diff) | |
parent | 34b38f06e00d929c3004ca7ee961405de0a209e1 (diff) | |
download | volse-hubzilla-bd3bc503edc9fd5035ed54070b0adf8760e402fa.tar.gz volse-hubzilla-bd3bc503edc9fd5035ed54070b0adf8760e402fa.tar.bz2 volse-hubzilla-bd3bc503edc9fd5035ed54070b0adf8760e402fa.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Storage/File.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 332bf6896..947a9fde3 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -127,12 +127,15 @@ class File extends DAV\Node implements DAV\IFile { $is_photo = false; $album = ''; + $os_path = ''; - $r = q("SELECT flags, folder, os_storage, filename, is_photo FROM attach WHERE hash = '%s' AND uid = %d LIMIT 1", + $r = q("SELECT flags, folder, os_storage, os_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']; + if (intval($r[0]['os_storage'])) { $d = q("select folder, content from attach where hash = '%s' and uid = %d limit 1", dbesc($this->data['hash']), @@ -150,7 +153,7 @@ class File extends DAV\Node implements DAV\IFile { } } $fname = dbunescbin($d[0]['content']); - if(strpos($fname,'store') === false) + if(strpos($fname,'store/') === false) $f = 'store/' . $this->auth->owner_nick . '/' . $fname ; else $f = $fname; @@ -196,7 +199,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_path' => $f, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct ); + $args = array( 'resource_id' => $this->data['hash'], 'album' => $album, 'os_syspath' => $f, 'os_path' => $os_path, 'filename' => $r[0]['filename'], 'getimagesize' => $gis, 'directory' => $direct ); $p = photo_upload($c[0],\App::get_observer(),$args); } |