From e2a15d0ec901e284e3b5893b72418c2fe93d9598 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 13 Oct 2015 14:05:27 +0200 Subject: fix photo visibility switch on photo upload --- include/attach.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/attach.php') diff --git a/include/attach.php b/include/attach.php index 48a88d6a5..a28a1a8ab 100644 --- a/include/attach.php +++ b/include/attach.php @@ -405,7 +405,6 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { require_once('include/photos.php'); - call_hooks('photo_upload_begin',$arr); $ret = array('success' => false); @@ -416,6 +415,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { $newalbum = (($arr) ? $arr['newalbum'] : ''); $hash = (($arr && $arr['hash']) ? $arr['hash'] : null); $upload_path = (($arr && $arr['directory']) ? $arr['directory'] : ''); + $visible = (($arr && $arr['visible']) ? $arr['visible'] : ''); $observer = array(); @@ -766,7 +766,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { if($is_photo) { - $args = array( 'source' => $source, 'visible' => 0, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct); + $args = array( 'source' => $source, 'visible' => $visible, 'resource_id' => $hash, 'album' => basename($pathname), 'os_path' => $os_basepath . $os_relpath, 'filename' => $filename, 'getimagesize' => $gis, 'directory' => $direct); if($arr['contact_allow']) $args['contact_allow'] = $arr['contact_allow']; if($arr['group_allow']) -- cgit v1.2.3