]> git.mxchange.org Git - friendica.git/blobdiff - mod/events.php
Merge pull request #9170 from MrPetovan/bug/9164-query-string-urlencoded
[friendica.git] / mod / events.php
index 437cc160b44493b3b6a0aac0808a35d36888a6e8..d82fbd818e4094058c6ab3d5bc383f74492e246f 100644 (file)
@@ -132,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();
@@ -141,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();
@@ -225,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();
        }
 
@@ -256,6 +256,11 @@ function events_content(App $a)
        // get the translation strings for the callendar
        $i18n = Event::getStrings();
 
+       DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.min.css');
+       DI::page()->registerStylesheet('view/asset/fullcalendar/dist/fullcalendar.print.min.css', 'print');
+       DI::page()->registerFooterScript('view/asset/moment/min/moment-with-locales.min.js');
+       DI::page()->registerFooterScript('view/asset/fullcalendar/dist/fullcalendar.min.js');
+
        $htpl = Renderer::getMarkupTemplate('event_head.tpl');
        DI::page()['htmlhead'] .= Renderer::replaceMacros($htpl, [
                '$module_url' => '/events',
@@ -583,9 +588,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');