aboutsummaryrefslogtreecommitdiffstats
path: root/mod/events.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-07 21:00:54 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-07 21:00:54 -0700
commitf84946c135412f59c13c15fa9c3292bc74098f92 (patch)
treec81c46abdb23ee94aba1f749657fd17d13379e7d /mod/events.php
parentc39e3613a8facf0ef626fbd671f21f822ff25096 (diff)
downloadvolse-hubzilla-f84946c135412f59c13c15fa9c3292bc74098f92.tar.gz
volse-hubzilla-f84946c135412f59c13c15fa9c3292bc74098f92.tar.bz2
volse-hubzilla-f84946c135412f59c13c15fa9c3292bc74098f92.zip
minor fix to event sync
Diffstat (limited to 'mod/events.php')
-rwxr-xr-xmod/events.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/mod/events.php b/mod/events.php
index 1e4fef73c..640020738 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -219,19 +219,23 @@ 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($item_id) {
+ $r = q("select * from item where id = %d",
+ intval($item_id)
);
- if($z) {
- build_sync_packet($channel['channel_id'],array('event_item' => array(encode_item($sync_item[0],true)),'event' => $z));
+ 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");