From 3c74aec9739a85f6992090775587a1c93e6fa6bb Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 13 Oct 2015 12:05:55 +0200 Subject: fix /channel not updating after posting comment --- mod/channel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/channel.php b/mod/channel.php index f1b74136e..0af2666cc 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -173,7 +173,7 @@ function channel_content(&$a, $update = 0, $load = false) { $r = q("SELECT distinct parent AS `item_id`, created from item left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids ) WHERE uid = %d $item_normal - AND item_wall = 1 AND item_unseen = 1 + AND item_wall = 1 $simple_update AND (abook.abook_blocked = 0 or abook.abook_flags is null) $sql_extra ORDER BY created DESC", -- cgit v1.2.3 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(-) 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