zoneminder/web/includes/actions
Isaac Connor 29d371313a fix: store zone thresholds as percentages and convert to pixels at runtime
Zone threshold fields (MinAlarmPixels, MaxAlarmPixels, MinFilterPixels,
MaxFilterPixels, MinBlobPixels, MaxBlobPixels) were being corrupted on
every save because the PHP conversion used monitor pixel area instead of
zone pixel area. This caused values to inflate progressively, breaking
motion detection.

The fix changes the storage model: thresholds are now stored as
percentages of zone area (DECIMAL(7,2) columns) matching the percentage
coordinate system from zm_update-1.39.2. The C++ Zone::Load() converts
percentages to pixel counts at runtime using polygon.Area(). Legacy
pixel-coordinate zones pass through unchanged.

JS changes:
- submitForm() converts to percentages when in Pixels display mode
- Init skips applyZoneUnits() since DB values are already percentages
- limitRange() only updates field.value when constrained value differs,
  preventing oninput from stripping decimal points mid-keystroke

fixes #4690

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 17:16:56 -04:00
..
bandwidth.php Use net zm_setcookie 2022-01-20 09:47:53 -05:00
console.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
control.php fix save button in controlpreset modal 2020-10-02 16:10:32 -05:00
controlcap.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
controlcaps.php Php namespace (#2537) 2019-02-22 09:19:07 -05:00
device.php remove warnings used for testing 2020-10-03 07:08:04 -05:00
devices.php Php namespace (#2537) 2019-02-22 09:19:07 -05:00
donate.php Use new getHomeView function instead of view=console 2023-03-05 10:21:59 -05:00
event.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
eventdetail.php Add event Name to the event detail modal 2023-05-12 15:15:55 -04:00
events.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
files.php Require path to be a defined storage area. Use detaintPath to prevent Path Traversal. Fixes GHSA-g355-3rf6-f38v 2024-10-21 17:40:01 -04:00
filter.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
function.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
group.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
groups.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
login.php feat: add Remember Me checkbox to login page 2026-03-06 15:41:25 -05:00
logout.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
monitor.php fix: sanitize monitor Device path to prevent command injection (GHSA-g66m-77fq-79v9) 2026-03-08 13:19:03 -04:00
monitors.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
montage.php Santisize zmMontageLayout when passing to constructor 2024-05-21 09:22:55 -04:00
options.php feat: add 'none' icon type, show icons in navbar, fix console column dropdown 2026-03-09 16:59:40 -04:00
privacy.php Use new getHomeView function instead of view=console 2023-03-05 10:21:59 -05:00
report.php rough in major actions for reports 2022-08-04 09:11:24 -04:00
role.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
server.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
settings.php WHen saving v4l settings redirect back to watch instead of console. 2021-10-19 12:39:37 -04:00
snapshot.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
state.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
storage.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
user.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
version.php add 1 month as an option to the version popup dropdown 2020-04-04 11:46:31 -04:00
zone.php fix: store zone thresholds as percentages and convert to pixels at runtime 2026-03-09 17:16:56 -04:00
zones.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00