From a5c43a8dab6a9478c32fc845d10179dd5076c82d Mon Sep 17 00:00:00 2001 From: Wilkware Date: Mon, 13 Jan 2025 11:05:58 +0100 Subject: [PATCH] Update v4.3.20250107_2 --- Abfall_ICS/README.md | 1 + Abfall_ICS/module.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Abfall_ICS/README.md b/Abfall_ICS/README.md index c274a66..3ea7358 100644 --- a/Abfall_ICS/README.md +++ b/Abfall_ICS/README.md @@ -132,6 +132,7 @@ v1.2.20250107 * _NEU_: Internationalisierte Anbieterauswahl * _NEU_: ICS Datei kann vom Filesystem geladen werden +* _FIX_: Events in ICS werden standardmäßig sortiert * _FIX_: Dokumentation verbessert v1.1.20240702 diff --git a/Abfall_ICS/module.php b/Abfall_ICS/module.php index 729b251..3a3b8e7 100644 --- a/Abfall_ICS/module.php +++ b/Abfall_ICS/module.php @@ -290,11 +290,11 @@ public function Update() return; } // get all events - $events = $ical->events(); + $events = $ical->sortEventsWithOrder($ical->events()); // go throw all events $this->SendDebug(__FUNCTION__, 'ICS Events: ' . $ical->eventCount); foreach ($events as $event) { - //$this->SendDebug(__FUNCTION__, 'Event: ' . $event->summary . ' = ' . $event->dtstart); + $this->SendDebug(__FUNCTION__, 'Event: ' . $event->summary . ' = ' . $event->dtstart); $dtstart = substr($event->dtstart, 0, 8); if ($dtstart < date('Ymd')) { continue;