aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-06-17 06:36:09 -0400
committerAndrew Manning <tamanning@zoho.com>2016-06-17 06:36:09 -0400
commit80d3a831f377820ef7b816129ad333a756a4a704 (patch)
tree21830d7f863a29f4c01b4b1be2e43f66767d1f4a /include/photos.php
parent961539258be90f5b7c989299db0e8c551d0d6c72 (diff)
parentaa5ac9dc3fb81bdc8aa17567eed42e845c408d00 (diff)
downloadvolse-hubzilla-80d3a831f377820ef7b816129ad333a756a4a704.tar.gz
volse-hubzilla-80d3a831f377820ef7b816129ad333a756a4a704.tar.bz2
volse-hubzilla-80d3a831f377820ef7b816129ad333a756a4a704.zip
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php14
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));
}