aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-07 21:02:05 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-07 21:02:05 -0700
commit880ca35681d63dc0a45174e1403af1005a88c848 (patch)
tree3db160c228ae8d26a92f4124ea7490ec047c4fc5 /mod
parent650e98b2a9aff2f54be84782ac48cc57badbf76f (diff)
parentf84946c135412f59c13c15fa9c3292bc74098f92 (diff)
downloadvolse-hubzilla-880ca35681d63dc0a45174e1403af1005a88c848.tar.gz
volse-hubzilla-880ca35681d63dc0a45174e1403af1005a88c848.tar.bz2
volse-hubzilla-880ca35681d63dc0a45174e1403af1005a88c848.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'mod')
-rwxr-xr-xmod/events.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/mod/events.php b/mod/events.php
index ca09385ef..d76602a33 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -205,19 +205,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");