X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fevents.php;h=69f6b6f326853cf2923379c94d982ce50008d57d;hb=748ddb7ad2394484d395bf2dbec4405916f12f6c;hp=5601c4449a86291d08ffb04349c3e70a623235ff;hpb=d6efc901946c91cf26a4436c4b58b1636e4bc9c9;p=friendica.git diff --git a/mod/events.php b/mod/events.php index 5601c4449a..69f6b6f326 100644 --- a/mod/events.php +++ b/mod/events.php @@ -1,6 +1,22 @@ . + * * The events module */ @@ -16,8 +32,8 @@ use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Event; use Friendica\Model\Item; -use Friendica\Model\Profile; use Friendica\Model\User; +use Friendica\Module\BaseProfile; use Friendica\Module\Security\Login; use Friendica\Util\DateTimeFormat; use Friendica\Util\Strings; @@ -50,7 +66,7 @@ function events_init(App $a) function events_post(App $a) { - Logger::log('post: ' . print_r($_REQUEST, true), Logger::DATA); + Logger::debug('post', ['request' => $_REQUEST]); if (!local_user()) { return; @@ -116,7 +132,7 @@ function events_post(App $a) $onerror_path = 'events/' . $action . '?' . http_build_query($params, null, null, PHP_QUERY_RFC3986); if (strcmp($finish, $start) < 0 && !$nofinish) { - notice(DI::l10n()->t('Event can not end before it has started.') . EOL); + 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(); @@ -125,7 +141,7 @@ function events_post(App $a) } if (!$summary || ($start === DBA::NULL_DATETIME)) { - notice(DI::l10n()->t('Event title and start time are required.') . EOL); + 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(); @@ -209,7 +225,7 @@ function events_post(App $a) function events_content(App $a) { if (!local_user()) { - notice(DI::l10n()->t('Permission denied.') . EOL); + notice(DI::l10n()->t('Permission denied.')); return Login::form(); } @@ -251,7 +267,7 @@ function events_content(App $a) $tabs = ''; // tabs if ($a->theme_events_in_profile) { - $tabs = Profile::getTabs($a, 'events', true); + $tabs = BaseProfile::getTabsHTML($a, 'events', true); } $mode = 'view'; @@ -567,9 +583,7 @@ function events_content(App $a) } if (Item::exists(['id' => $ev[0]['itemid']])) { - notice(DI::l10n()->t('Failed to remove event') . EOL); - } else { - info(DI::l10n()->t('Event removed') . EOL); + notice(DI::l10n()->t('Failed to remove event')); } DI::baseUrl()->redirect('events');