Commit a50a27c
fix: canonicalise Monitors.ObjectDetection to lowercase
The column's values are all lowercase - 'none', 'quadra', 'uvicorn',
'openvino', 'mx_accl' - and the column default is 'none', but the monitor
edit UI offered the off setting keyed as 'None'. Since 1.37.69 the column is
a plain VARCHAR rather than an enum, so that spelling was stored verbatim and
zmc logged "Unsupported value for ObjectDetection: None" for every affected
monitor on load. The console's javascript compared against 'none' and so
listed those monitors as actively object detecting, and monitor.js's
ObjectDetection_onChange fell through to its unknown-value branch, leaving
the model and threshold fields showing for a monitor with detection off.
Fix the stored value rather than teaching every reader to accept both
spellings: write 'none' from the UI, the Monitor.php defaults, the console
ajax fallback and Monitor.pm, and add zm_update-1.39.19.sql to lower existing
rows. The UPDATE is unconditional because the default collation is
case-insensitive, so a `WHERE ObjectDetection != LOWER(ObjectDetection)`
guard would never match; it is idempotent as written.
Also correct the console's fps column, which tested ObjectDetection against
'None' where every other test used 'none', and treat a NULL column as 'none'
in Monitor::Load instead of constructing a std::string from a null pointer.
Bump version.txt and the redhat spec Version to 1.39.19.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GuPNKrTGdfFT4t6G2BJbug1 parent e845878 commit a50a27c
9 files changed
Lines changed: 25 additions & 8 deletions
File tree
- db
- distros/redhat
- scripts/ZoneMinder/lib/ZoneMinder
- src
- web
- ajax
- includes
- skins/classic/views
- js
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
1102 | | - | |
| 1102 | + | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | 1105 | | |
| |||
0 commit comments