[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] Calendar: correctly import all-day events from ICS files

"Adrien Mbuya Maloba \(@adrienmaloba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a78fb5120661_381aafe02814f@gitlab-sidekiq-low-urgency-cpu-bound-v2-57d89f4484-896rg.mail>

Adrien Mbuya Maloba pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
6e2fec97 by Adrien Mbuya Maloba at 2026-08-10T01:06:41+03:00
[BP][FIX] Calendar: correctly import all-day events from ICS files
---
* [BP][FIX] Calendar: correctly import all-day events from ICS files
---
* [REF] Calendar: remove duplicated all-day event detection
---
* [REF] Calendar: remove duplicated all-day event detection

See merge request tikiwiki/tiki!10867

* [FIX] Calendar: correctly import all-day events from ICS files
---
* [FIX] Calendar: correctly import all-day events from ICS files

See merge request tikiwiki/tiki!10825

See merge request tikiwiki/tiki!10869

See merge request tikiwiki/tiki!10874

- - - - -


1 changed file:

- lib/core/Tiki/SabreDav/Utilities.php


Changes:

=====================================
lib/core/Tiki/SabreDav/Utilities.php
=====================================
@@ -346,10 +346,15 @@ class Utilities
         if (isset($component->URL)) {
             $result['url'] = $convertToString($component->URL);
         }
+        // Detect all-day events, including imported ICS files
+        $isAllDay = ! $component->DTSTART->hasTime();
         if (isset($component->{'X-Tiki-Allday'})) {
-            $result['allday'] = empty($convertToString($component->{'X-Tiki-Allday'})) ? 0 : 1;
+            $isAllDay = ! empty($convertToString($component->{'X-Tiki-Allday'}));
+        }
+        if ($isAllDay) {
+            $result['allday'] = 1;
             if ($rec) {
-                $rec->setAllday(empty($convertToString($component->{'X-Tiki-Allday'})) ? 0 : 1);
+                $rec->setAllday(1);
             }
         }
         if (isset($component->{'X-Tiki-sendReminder'})) {



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

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/6e2fec97aa5842c48189d14d129a885b2551a607
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
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.