[TikiWiki-commits] [Git][tikiwiki/tiki][30.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 <6a779c195cbcd_3819f4d844545@gitlab-sidekiq-low-urgency-cpu-bound-v2-57d89f4484-wdq57.mail>

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


Commits:
73c257e6 by Adrien Mbuya Maloba at 2026-08-09T00:09:20+03:00
[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

- - - - -


1 changed file:

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


Changes:

=====================================
lib/core/Tiki/SabreDav/Utilities.php
=====================================
@@ -347,10 +347,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/73c257e6068251ac8ddba45da8dc33ea09782d27

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/73c257e6068251ac8ddba45da8dc33ea09782d27
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.