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/attach.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/attach.php')
-rw-r--r-- | include/attach.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/attach.php b/include/attach.php index 78efde51f..33545b12a 100644 --- a/include/attach.php +++ b/include/attach.php @@ -423,6 +423,8 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { $observer = array(); + $dosync = ((array_key_exists('nosync',$arr) && $arr['nosync']) ? 0 : 1); + if($observer_hash) { $x = q("select * from xchan where xchan_hash = '%s' limit 1", dbesc($observer_hash) @@ -829,6 +831,8 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { if($arr['description']) $args['description'] = $arr['description']; + $args['deliver'] = $dosync; + $p = photo_upload($channel,$observer,$args); if($p['success']) { $ret['body'] = $p['body']; @@ -865,10 +869,12 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { call_hooks('photo_upload_end',$ret); } - $sync = attach_export_data($channel,$hash); + if($dosync) { + $sync = attach_export_data($channel,$hash); - if($sync) - build_sync_packet($channel['channel_id'],array('file' => array($sync))); + if($sync) + build_sync_packet($channel['channel_id'],array('file' => array($sync))); + } return $ret; } |