aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-04-15 10:22:31 +0200
committerMario <mario@mariovavti.com>2020-04-15 10:22:31 +0200
commitc640d1c599bdadb9c4d4f2a0e5b82db585d17686 (patch)
tree7c1b9650219cd52b996ecf92d8587bbb10611823
parent9d0f71bfcbc0d1080a9f93590118046d326cae70 (diff)
parent6a0ac591d161df1b3a1d6182915ed01cfee95b0a (diff)
downloadvolse-hubzilla-c640d1c599bdadb9c4d4f2a0e5b82db585d17686.tar.gz
volse-hubzilla-c640d1c599bdadb9c4d4f2a0e5b82db585d17686.tar.bz2
volse-hubzilla-c640d1c599bdadb9c4d4f2a0e5b82db585d17686.zip
Merge branch 'dev' into 'dev'
event issue when using strict sql mode See merge request hubzilla/core!1849
-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']),