<?php
/**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
+use Friendica\Core\System;
use Friendica\Core\Theme;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
if (strcmp($finish, $start) < 0 && !$nofinish) {
notice(DI::l10n()->t('Event can not end before it has started.'));
if (intval($_REQUEST['preview'])) {
- echo DI::l10n()->t('Event can not end before it has started.');
- exit();
+ System::httpExit(DI::l10n()->t('Event can not end before it has started.'));
}
DI::baseUrl()->redirect($onerror_path);
}
if (!$summary || ($start === DBA::NULL_DATETIME)) {
notice(DI::l10n()->t('Event title and start time are required.'));
if (intval($_REQUEST['preview'])) {
- echo DI::l10n()->t('Event title and start time are required.');
- exit();
+ System::httpExit(DI::l10n()->t('Event title and start time are required.'));
}
DI::baseUrl()->redirect($onerror_path);
}
$datarray['id'] = $event_id;
if (intval($_REQUEST['preview'])) {
- $html = Event::getHTML($datarray);
- echo $html;
- exit();
+ System::httpExit(Event::getHTML($datarray));
}
$event_id = Event::store($datarray);
]);
if (!empty($_GET['id'])) {
- echo $o;
- exit();
+ System::httpExit($o);
}
return $o;