mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-08-03 00:37:21 -04:00
web/ajax/events.php and the montagereview.php event query carried the same EndTimeSecs fallback just fixed in the Event API model: an event with no EndDateTime and Length 0 (an empty crash-orphaned event) reported its end as NOW(), so it appeared to span from its start until now and overlapped every later event. Change the ELSE branch of both the EndDateTime and EndTimeSecs CASE expressions from NOW() to StartDateTime, so an empty event has no span. Both columns are changed together so a single row stays consistent. Verified against the database: for a Length-0 event with no EndDateTime the CASE now yields EndTimeSecs == StartTimeSecs, while length-based and properly-closed events are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>