* @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';
// 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;
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.');
$m = 0;
$ignored = ((x($_REQUEST, 'ignored')) ? intval($_REQUEST['ignored']) : 0);
- if($a->argc > 1) {
+ if ($a->argc > 1) {
if ($a->argc > 2 && $a->argv[1] == 'event') {
$mode = 'edit';
$event_id = intval($a->argv[2]);
}
- if($a->argc > 2 && $a->argv[1] == 'drop') {
+ if ($a->argc > 2 && $a->argv[1] == 'drop') {
$mode = 'drop';
$event_id = intval($a->argv[2]);
}
);
// get events by id or by date
- if (x($_GET, 'id')){
+ if (x($_GET, 'id')) {
$r = event_by_id(local_user(), $event_params);
} else {
$r = events_by_date(local_user(), $event_params);
killme();
}
- if (x($_GET, 'id')){
+ if (x($_GET, 'id')) {
$tpl = get_markup_template("event.tpl");
} else {
$tpl = get_markup_template("events_js.tpl");