aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-07 20:29:13 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-07 20:29:13 -0700
commit508969a183669b0f1f9cf60b06a68d5b51b501d1 (patch)
tree871892d52b1f908cf60dbcd084208dadb5b6b4a1 /include/event.php
parent4eec9a2fba46396edadc03e71da025ac15389f68 (diff)
parentc39e3613a8facf0ef626fbd671f21f822ff25096 (diff)
downloadvolse-hubzilla-508969a183669b0f1f9cf60b06a68d5b51b501d1.tar.gz
volse-hubzilla-508969a183669b0f1f9cf60b06a68d5b51b501d1.tar.bz2
volse-hubzilla-508969a183669b0f1f9cf60b06a68d5b51b501d1.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/event.php b/include/event.php
index 6670bc53b..44c172e98 100644
--- a/include/event.php
+++ b/include/event.php
@@ -446,6 +446,20 @@ function event_addtocal($item_id, $uid) {
intval($channel['channel_id'])
);
+ $item['resource_id'] = $event['event_hash'];
+ $item['resource_type'] = 'event';
+
+ $i = array($item);
+ xchan_query($i);
+ $sync_item = fetch_post_tags($i);
+ $z = q("select * from event where event_hash = '%s' and uid = %d limit 1",
+ dbesc($event['event_hash']),
+ intval($channel['channel_id'])
+ );
+ if($z) {
+ build_sync_packet($channel['channel_id'],array('event_item' => array(encode_item($sync_item[0],true)),'event' => $z));
+ }
+
return true;
}
}
@@ -959,4 +973,4 @@ function tasks_fetch($arr) {
return $ret;
-} \ No newline at end of file
+}