aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-17 10:04:27 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-17 10:04:27 +0200
commit0324bc5cf0fe6a758070cdc74897836758187b30 (patch)
treec7e8fc672f83950aa61dd97b5fb0d22a108097b8 /include/attach.php
parent5b479d63d62ef893360fd210947012310e8f9755 (diff)
parentf6d76282549c562120417cbdd111109add4f7672 (diff)
downloadvolse-hubzilla-0324bc5cf0fe6a758070cdc74897836758187b30.tar.gz
volse-hubzilla-0324bc5cf0fe6a758070cdc74897836758187b30.tar.bz2
volse-hubzilla-0324bc5cf0fe6a758070cdc74897836758187b30.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'include/attach.php')
-rw-r--r--include/attach.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/attach.php b/include/attach.php
index 17e5067ff..dae658d8e 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;
}