X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fevents.php;h=876727608d033937ea542cefcd79570b3188d11b;hb=74479c4020499e6aa7866b5478366932b723c515;hp=bcf80dd1c75e7cbe13fdf670f6c89b46b120271c;hpb=497df57ef7581855e3d813e6a07a3d584b91f1d9;p=friendica.git diff --git a/mod/events.php b/mod/events.php index bcf80dd1c7..876727608d 100644 --- a/mod/events.php +++ b/mod/events.php @@ -3,6 +3,9 @@ * @file mod/events.php * @brief The events module */ + +use Friendica\App; + require_once 'include/bbcode.php'; require_once 'include/datetime.php'; require_once 'include/event.php'; @@ -53,8 +56,8 @@ function events_post(App $a) { // The default setting for the `private` field in event_store() is false, so mirror that $private_event = false; - $start = '0000-00-00 00:00:00'; - $finish = '0000-00-00 00:00:00'; + $start = NULL_DATE; + $finish = NULL_DATE; if ($start_text) { $start = $start_text; @@ -98,7 +101,7 @@ function events_post(App $a) { goaway($onerror_url); } - if ((! $summary) || ($start === '0000-00-00 00:00:00')) { + if ((! $summary) || ($start === NULL_DATE)) { notice(t('Event title and start time are required.') . EOL); if (intval($_REQUEST['preview'])) { echo t('Event title and start time are required.');