aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-10-12 12:13:44 +0200
committerMario Vavti <mario@mariovavti.com>2016-10-12 12:13:44 +0200
commitcf547be1d6900d12719a9372cbc1a5d433d31863 (patch)
tree03a525cf40905adafc21b0c4146e467bad288437 /include/event.php
parent29617737ca2c03c800ebbe4701dc21cf9f25ce22 (diff)
parent16da1a4e810889448eecbd13d68183a820bcebe2 (diff)
downloadvolse-hubzilla-cf547be1d6900d12719a9372cbc1a5d433d31863.tar.gz
volse-hubzilla-cf547be1d6900d12719a9372cbc1a5d433d31863.tar.bz2
volse-hubzilla-cf547be1d6900d12719a9372cbc1a5d433d31863.zip
Merge branch '1.14RC'
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/event.php b/include/event.php
index 3d650cd14..153654120 100644
--- a/include/event.php
+++ b/include/event.php
@@ -343,6 +343,13 @@ function event_store_event($arr) {
}
}
+ $hook_info = [ 'event' => $arr, 'existing_event' => $existing_event, 'cancel' => false ];
+ call_hooks('event_store_event',$hook_info);
+ if($hook_info['cancel'])
+ return false;
+
+ $arr = $hook_info['event'];
+ $existing_event = $hook_info['existing_event'];
if($existing_event) {
@@ -371,6 +378,7 @@ function event_store_event($arr) {
`event_repeat` = '%s',
`event_sequence` = %d,
`event_priority` = %d,
+ `event_vdata` = '%s',
`allow_cid` = '%s',
`allow_gid` = '%s',
`deny_cid` = '%s',
@@ -392,6 +400,7 @@ function event_store_event($arr) {
dbesc($arr['event_repeat']),
intval($arr['event_sequence']),
intval($arr['event_priority']),
+ dbesc($arr['event_vdata']),
dbesc($arr['allow_cid']),
dbesc($arr['allow_gid']),
dbesc($arr['deny_cid']),
@@ -412,8 +421,8 @@ function event_store_event($arr) {
$hash = random_string() . '@' . App::get_hostname();
$r = q("INSERT INTO event ( uid,aid,event_xchan,event_hash,created,edited,dtstart,dtend,summary,description,location,etype,
- adjust,nofinish, event_status, event_status_date, event_percent, event_repeat, event_sequence, event_priority, allow_cid,allow_gid,deny_cid,deny_gid)
- VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d, '%s', %d, %d, '%s', '%s', '%s', '%s' ) ",
+ adjust,nofinish, event_status, event_status_date, event_percent, event_repeat, event_sequence, event_priority, event_vdata, allow_cid,allow_gid,deny_cid,deny_gid)
+ VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s' ) ",
intval($arr['uid']),
intval($arr['account']),
dbesc($arr['event_xchan']),
@@ -434,6 +443,7 @@ function event_store_event($arr) {
dbesc($arr['event_repeat']),
intval($arr['event_sequence']),
intval($arr['event_priority']),
+ dbesc($arr['event_vdata']),
dbesc($arr['allow_cid']),
dbesc($arr['allow_gid']),
dbesc($arr['deny_cid']),