[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Fix the issue when saving a calendar event

"Alvin Bauma \(@alvinBM\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6991b88a25180_3b6fa8088190e0@gitlab-sidekiq-low-urgency-cpu-bound-v2-7b68dd745d-msl8q.mail>

Alvin Bauma pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
f10c03ca by Alvin Bauma at 2026-02-15T13:13:59+01:00
[FIX] Fix the issue when saving a calendar event
---
* [FIX] Fix the issue when saving a calendar event

See merge request tikiwiki/tiki!9578

- - - - -


1 changed file:

- lib/core/Services/Calendar/Controller.php


Changes:

=====================================
lib/core/Services/Calendar/Controller.php
=====================================
@@ -283,26 +283,26 @@ class Services_Calendar_Controller extends Services_Calendar_BaseController
                 $calendar = $this->calendarLib->get_calendar($calendarId);
                 $calitem = $this->processParticipants($calitem);
                 if (isset($calitem["name"])) {
-                    Feedback::validateFieldLength("Title", $calitem["name"], CalendarLib::MAX_CALENDAR_EVENT_TITLE_LENGTH);
-                    return [];
+                    if (! Feedback::validateFieldLength("Title", $calitem["name"], CalendarLib::MAX_CALENDAR_EVENT_TITLE_LENGTH)) {
+                        return [];
+                    }
                 }
                 if (isset($calitem["description"])) {
-                    Feedback::validateFieldLength("Description", $calitem["description"], CalendarLib::MAX_CALENDAR_EVENT_DESCRIPTION_LENGTH);
-                    return [];
+                    if (! Feedback::validateFieldLength("Description", $calitem["description"], CalendarLib::MAX_CALENDAR_EVENT_DESCRIPTION_LENGTH)) {
+                        return [];
+                    }
                 }
                 // save event
                 if ($input->act->word() === 'saveitem' || $input->act->word() === 'saveas') {
                     if (! $input->calendarchanged->int()) {
                         $saved = $this->saveEvent($calitem, $calendar, $input);
                         if ($saved) { // then redirect?
-                            if ($input->offsetExists('exact_start_end')) {
-                                Feedback::success(tr('Event saved successfully.'));
-                            }
+                            Feedback::success(tr('Event saved successfully.'));
                             if ($input->offsetExists('redirect')) {
                                 return ['url' => $input->redirect->url()];
                             } else {
                                 if ($return_url && ! $access->is_xml_http_request()) {
-                                    return $access->redirect($return_url, tr('The event was saved successfully'));
+                                    $access->redirect($return_url, tr('The event was saved successfully'));
                                 }
                                 // reload the page?
                                 return [];



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/f10c03ca65813480011ae4161ac52efd0d6d10bf

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/f10c03ca65813480011ae4161ac52efd0d6d10bf
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.