aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/event.php b/include/event.php
index 0c29d26f6..1fe6e6f7f 100644
--- a/include/event.php
+++ b/include/event.php
@@ -374,6 +374,26 @@ function event_store_item($arr,$event) {
intval($arr['uid'])
);
+
+ $s = q("delete from term where oid = %d and otype = %d",
+ intval($r[0]['id']),
+ intval(TERM_OBJ_POST)
+ );
+
+ if(($arr['term']) && (is_array($arr['term']))) {
+ foreach($arr['term'] as $t) {
+ q("insert into term (uid,oid,otype,type,term,url)
+ values(%d,%d,%d,%d,'%s','%s') ",
+ intval($arr['uid']),
+ intval($r[0]['id']),
+ intval(TERM_OBJ_POST),
+ intval($t['type']),
+ dbesc($t['term']),
+ dbesc($t['url'])
+ );
+ }
+ }
+
$item_id = $r[0]['id'];
call_hooks('event_updated', $event['id']);
return $item_id;
@@ -424,6 +444,10 @@ function event_store_item($arr,$event) {
$item_arr['item_private'] = $private;
$item_arr['verb'] = ACTIVITY_POST;
+
+ if(array_key_exists('term',$arr))
+ $item_arr['term'] = $arr['term'];
+
$item_arr['resource_type'] = 'event';
$item_arr['resource_id'] = $event['event_hash'];