diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:06:32 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-20 13:06:32 -0400 |
commit | f4d9d34bbce463e09d45dce137c35ed531bc4ba1 (patch) | |
tree | a541fb28d557246ff6460287d4c0acb513d6a730 /include/photos.php | |
parent | e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7 (diff) | |
parent | cc09f9a7a5f799a0811ba83799c0a3ac6598c476 (diff) | |
download | volse-hubzilla-f4d9d34bbce463e09d45dce137c35ed531bc4ba1.tar.gz volse-hubzilla-f4d9d34bbce463e09d45dce137c35ed531bc4ba1.tar.bz2 volse-hubzilla-f4d9d34bbce463e09d45dce137c35ed531bc4ba1.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'include/photos.php')
-rw-r--r-- | include/photos.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/photos.php b/include/photos.php index c64d662ea..da6118b38 100644 --- a/include/photos.php +++ b/include/photos.php @@ -41,6 +41,10 @@ function photo_upload($channel, $observer, $args) { else $visible = 0; + $deliver = true; + if(array_key_exists('deliver',$args)) + $deliver = intval($args['deliver']); + // Set to default channel permissions. If the parent directory (album) has permissions set, // use those instead. If we have specific permissions supplied, they take precedence over // all other settings. 'allow_cid' being passed from an external source takes priority over channel settings. @@ -330,7 +334,7 @@ function photo_upload($channel, $observer, $args) { if($item['mid'] === $item['parent_mid']) { - $item['body'] = $args['body']; + $item['body'] = $summary; $item['obj_type'] = ACTIVITY_OBJ_PHOTO; $item['obj'] = json_encode($object); @@ -355,14 +359,14 @@ function photo_upload($channel, $observer, $args) { if(($item['edited'] > $r[0]['edited']) || $force) { $item['id'] = $r[0]['id']; $item['uid'] = $channel['channel_id']; - item_store_update($item); + item_store_update($item,false,$deliver); continue; } } else { $item['aid'] = $channel['channel_account_id']; $item['uid'] = $channel['channel_id']; - $item_result = item_store($item); + $item_result = item_store($item,false,$deliver); } } } @@ -414,10 +418,10 @@ function photo_upload($channel, $observer, $args) { - $result = item_store($arr); + $result = item_store($arr,false,$deliver); $item_id = $result['item_id']; - if($visible) + if($visible && $deliver) Zotlabs\Daemon\Master::Summon(array('Notifier', 'wall-new', $item_id)); } |