aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-09-09 21:32:25 +0100
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-09-09 21:32:25 +0100
commitec4f30c3f672bbfc57bee8db0aaa0cf002fe8687 (patch)
treecf1aa37d881f2ce3cb844bbcd5c11c5999e96c66 /include/event.php
parent652ec8c3fcc956c1a5fc2adb7410e4c4a2ac6f90 (diff)
parent409c89d629993b59eaafa8443ae9d0b5f0344c1f (diff)
downloadvolse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.tar.gz
volse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.tar.bz2
volse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.zip
Merge remote-tracking branch 'upstream/master'
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'];