Files
zoneminder/web/api/app
SteveGilvarry 18011e3e62 fix: make monitors API index portable under ONLY_FULL_GROUP_BY
The monitors index unconditionally LEFT JOINed Groups_Monitors and collapsed
the duplicate rows (monitors in multiple groups) with GROUP BY `Monitor`.`Id`.
That GROUP BY fails under ONLY_FULL_GROUP_BY on engines without functional
dependency detection (MariaDB), raising 1055 'Monitor.Name isn't in GROUP BY',
so /api/monitors.json returned a 500 while /api/monitors/<id>.json worked.

Only join Groups_Monitors when the request filters by group (matching the
existing EventsController pattern and the original commented-out intent), drop
the GROUP BY, and dedupe by monitor Id in the existing result loop to cover
multi-value GroupId filters. Portable across MySQL and MariaDB.

refs #3633
2026-06-14 00:18:26 +10:00
..
2023-02-01 14:34:05 -05:00
2023-11-03 13:33:28 -04:00
2021-03-31 12:11:12 -04:00
2021-03-31 12:11:12 -04:00