aboutsummaryrefslogtreecommitdiffstats
path: root/include/event.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-04-10 14:27:20 -0700
committerzotlabs <mike@macgirvin.com>2020-04-10 14:27:20 -0700
commit6a0ac591d161df1b3a1d6182915ed01cfee95b0a (patch)
tree16b86344d5c8b2dec7fa615fc0957a9f245a0c63 /include/event.php
parent328685d2fbe505fd5b1bf9892a0cce993210ac52 (diff)
downloadvolse-hubzilla-6a0ac591d161df1b3a1d6182915ed01cfee95b0a.tar.gz
volse-hubzilla-6a0ac591d161df1b3a1d6182915ed01cfee95b0a.tar.bz2
volse-hubzilla-6a0ac591d161df1b3a1d6182915ed01cfee95b0a.zip
event issue when using strict sql mode
Diffstat (limited to 'include/event.php')
-rw-r--r--include/event.php22
1 files changed, 13 insertions, 9 deletions
diff --git a/include/event.php b/include/event.php
index c9cbb7c94..6161175f6 100644
--- a/include/event.php
+++ b/include/event.php
@@ -422,6 +422,10 @@ function event_store_event($arr) {
$arr['event_xchan'] = (($arr['event_xchan']) ? $arr['event_xchan'] : '');
$arr['event_priority'] = (($arr['event_priority']) ? $arr['event_priority'] : 0);
+ if (! $arr['dtend']) {
+ $arr['dtend'] = NULL_DATE;
+ $arr['nofinish'] = 1;
+ }
if(array_key_exists('event_status_date',$arr))
$arr['event_status_date'] = datetime_convert('UTC','UTC', $arr['event_status_date']);
@@ -507,9 +511,9 @@ function event_store_event($arr) {
deny_gid = '%s'
WHERE id = %d AND uid = %d",
- dbesc($arr['edited']),
- dbesc($arr['dtstart']),
- dbesc($arr['dtend']),
+ dbesc(datetime_convert('UTC','UTC',$arr['edited'])),
+ dbesc(datetime_convert('UTC','UTC',$arr['dtstart'])),
+ dbesc(datetime_convert('UTC','UTC',$arr['dtend'])),
dbesc($arr['summary']),
dbesc($arr['description']),
dbesc($arr['location']),
@@ -517,7 +521,7 @@ function event_store_event($arr) {
intval($arr['adjust']),
intval($arr['nofinish']),
dbesc($arr['event_status']),
- dbesc($arr['event_status_date']),
+ dbesc(datetime_convert('UTC','UTC',$arr['event_status_date'])),
intval($arr['event_percent']),
dbesc($arr['event_repeat']),
intval($arr['event_sequence']),
@@ -553,10 +557,10 @@ function event_store_event($arr) {
intval($arr['account']),
dbesc($arr['event_xchan']),
dbesc($hash),
- dbesc($arr['created']),
- dbesc($arr['edited']),
- dbesc($arr['dtstart']),
- dbesc($arr['dtend']),
+ dbesc(datetime_convert('UTC','UTC',$arr['created'])),
+ dbesc(datetime_convert('UTC','UTC',$arr['edited'])),
+ dbesc(datetime_convert('UTC','UTC',$arr['dtstart'])),
+ dbesc(datetime_convert('UTC','UTC',$arr['dtend'])),
dbesc($arr['summary']),
dbesc($arr['description']),
dbesc($arr['location']),
@@ -564,7 +568,7 @@ function event_store_event($arr) {
intval($arr['adjust']),
intval($arr['nofinish']),
dbesc($arr['event_status']),
- dbesc($arr['event_status_date']),
+ dbesc(datetime_convert('UTC','UTC',$arr['event_status_date'])),
intval($arr['event_percent']),
dbesc($arr['event_repeat']),
intval($arr['event_sequence']),