aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-14 22:02:28 -0700
committerMario Vavti <mario@mariovavti.com>2017-03-29 13:44:17 +0200
commitfa5115b3ed017f6aa22c99cad563de3934b171c2 (patch)
treec991038cb13bfbbbead26a6a66f82f26b38e1e0b /include/photos.php
parentec5e1067bc0a949ceea7e28dbf11873e693b2586 (diff)
downloadvolse-hubzilla-fa5115b3ed017f6aa22c99cad563de3934b171c2.tar.gz
volse-hubzilla-fa5115b3ed017f6aa22c99cad563de3934b171c2.tar.bz2
volse-hubzilla-fa5115b3ed017f6aa22c99cad563de3934b171c2.zip
add os_path and display_path to photos, fix some issues with multiple path separators after cloud/nickname in the content field of attach and photos
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/photos.php b/include/photos.php
index c0f7dc8c4..22b3e0c88 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -67,8 +67,8 @@ function photo_upload($channel, $observer, $args) {
$os_storage = 0;
- if($args['os_path'] && $args['getimagesize']) {
- $imagedata = @file_get_contents($args['os_path']);
+ if($args['os_syspath'] && $args['getimagesize']) {
+ $imagedata = @file_get_contents($args['os_syspath']);
$filename = $args['filename'];
$filesize = strlen($imagedata);
// this is going to be deleted if it exists
@@ -153,7 +153,7 @@ function photo_upload($channel, $observer, $args) {
return $ret;
}
- $exif = $ph->orient(($args['os_path']) ? $args['os_path'] : $src);
+ $exif = $ph->orient(($args['os_syspath']) ? $args['os_syspath'] : $src);
@unlink($src);
@@ -180,7 +180,8 @@ function photo_upload($channel, $observer, $args) {
'filename' => $filename, 'album' => $album, 'imgscale' => 0, 'photo_usage' => PHOTO_NORMAL,
'allow_cid' => $ac['allow_cid'], 'allow_gid' => $ac['allow_gid'],
'deny_cid' => $ac['deny_cid'], 'deny_gid' => $ac['deny_gid'],
- 'os_storage' => $os_storage, 'os_path' => $args['os_path']
+ 'os_storage' => $os_storage, 'os_syspath' => $args['os_syspath'],
+ 'os_path' => $args['os_path'], 'display_path' => $args['display_path']
);
if($args['created'])
$p['created'] = $args['created'];
@@ -205,7 +206,7 @@ function photo_upload($channel, $observer, $args) {
$errors = true;
unset($p['os_storage']);
- unset($p['os_path']);
+ unset($p['os_syspath']);
if(($width > 1024 || $height > 1024) && (! $errors))
$ph->scaleImage(1024);