diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-17 06:36:09 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-17 06:36:09 -0400 |
commit | 80d3a831f377820ef7b816129ad333a756a4a704 (patch) | |
tree | 21830d7f863a29f4c01b4b1be2e43f66767d1f4a /include/attach.php | |
parent | 961539258be90f5b7c989299db0e8c551d0d6c72 (diff) | |
parent | aa5ac9dc3fb81bdc8aa17567eed42e845c408d00 (diff) | |
download | volse-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/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; } |