aboutsummaryrefslogtreecommitdiffstats
path: root/mod
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 /mod
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 'mod')
-rwxr-xr-xmod/events.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/mod/events.php b/mod/events.php
index 9120f8713..ca09385ef 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -205,6 +205,19 @@ function events_post(&$a) {
$item_id = event_store_item($datarray,$event);
+ if($r) {
+ xchan_query($r);
+ $sync_item = fetch_post_tags($r);
+ $z = q("select * from event where event_hash = '%s' and uid = %d limit 1",
+ dbesc($r[0]['resource_id']),
+ intval($channel['channel_id'])
+ );
+ if($z) {
+ build_sync_packet($channel['channel_id'],array('event_item' => array(encode_item($sync_item[0],true)),'event' => $z));
+ }
+ }
+
+
if($share)
proc_run('php',"include/notifier.php","event","$item_id");
@@ -528,6 +541,9 @@ function events_content(&$a) {
dbesc($event_id),
intval(local_channel())
);
+
+ $sync_event = $r[0];
+
if($r) {
$r = q("delete from event where event_hash = '%s' and uid = %d limit 1",
dbesc($event_id),
@@ -538,6 +554,9 @@ function events_content(&$a) {
dbesc($event_id),
intval(local_channel())
);
+ $sync_event['event_deleted'] = 1;
+ build_sync_packet(0,array('event' => array($sync_event)));
+
info( t('Event removed') . EOL);
}
else {