zoneminder/web/includes
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
..
actions fix: store zone thresholds as percentages and convert to pixels at runtime 2026-03-09 17:16:56 -04:00
csrf Until we use "use strict", additional code analysis is required (csrf-magic.js) 2025-08-09 18:54:45 +03:00
Control.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Event.php fix: harden web interface against injection and SSRF vulnerabilities 2026-03-08 23:30:49 -04:00
Event_Data.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Event_Tag.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Filter.php Remove Preview Rate Control. Disable BuiltIn Video controls. 2026-01-29 11:18:30 -05:00
FilterTerm.php fix: close SQL injection, command injection, and shell escaping gaps 2026-03-09 10:48:23 -04:00
Frame.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Group.php Remove session usage for monitor filters, use cookies only 2026-01-07 18:23:47 +00:00
Group_Monitor.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Group_Permission.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Manufacturer.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
MenuItem.php feat: add 'none' icon type, show icons in navbar, fix console column dropdown 2026-03-09 16:59:40 -04:00
Model.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Monitor.php fix: resolve role-based group permissions not granting stream access 2026-03-09 15:07:14 -04:00
Monitor_Permission.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
MontageLayout.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Object.php Add support for the string NULL is object lookup values 2026-01-30 08:33:49 -05:00
Report.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Role_Group_Permission.php feat: add User Roles feature for reusable permission templates 2026-01-29 13:34:27 -05:00
Role_Monitor_Permission.php feat: add User Roles feature for reusable permission templates 2026-01-29 13:34:27 -05:00
Server.php Update Server.php 2026-01-31 21:01:00 -05:00
Snapshot.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
Storage.php Use the same filter on Storage Name as we use in Monitor Name. 2024-09-30 06:33:09 -04:00
Tag.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
User.php feat: add User Roles feature for reusable permission templates 2026-01-29 13:34:27 -05:00
User_Preference.php fix: php 8.3 deprecated get_class method call without argument 2023-11-22 10:48:04 +03:30
User_Role.php feat: add User Roles feature for reusable permission templates 2026-01-29 13:34:27 -05:00
Zone.php fix: auto-detect and convert pixel zone coordinates to percentages in web layer 2026-02-27 17:49:14 -05:00
auth.php feat: add Remember Me checkbox to login page 2026-03-06 15:41:25 -05:00
config.php.in Remove zm_configvals. Just use zm_config. Move code into loadConfig. 2026-01-05 09:32:25 -05:00
control_functions.php Remove extra { breaking ptz 2022-04-23 19:29:04 -04:00
database.php Merge dbUpdate and dbInsert from another branch 2024-11-18 10:47:07 -05:00
download_functions.php fix: add -- end-of-options marker before filename operands in tar/zip/gzip commands 2026-03-09 16:55:56 +00:00
functions.php fix: clarify warning message field vs file wording 2026-03-09 16:55:35 +00:00
lang.php Convert user from an array to a User object 2023-04-23 12:57:29 -04:00
logger.php feat: add AUDIT logging level for tracking administrative changes 2026-02-23 18:19:20 -05:00
monitor_probe.php fix: escape URL in wget() to prevent command injection in camera probe (GHSA-745h-vg7c-73cg) 2026-03-08 16:56:03 -04:00
session.php feat: add Remember Me checkbox to login page 2026-03-06 15:41:25 -05:00