Commit Graph
2346 Commits
Author SHA1 Message Date
Isaac ConnorandClaude Opus 5.5 f597ba4902 test: filter text test lifts filterSelectionScalars() with getFilterSelection()
getFilterSelection() in _monitor_filters.php now passes request and cookie
values through filterSelectionScalars() (#8455), so the test has to
evaluate that function too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:40:07 -05:00
Isaac ConnorandClaude Opus 5.5 83c734d473 test: PHP test stubs know the helpers and include path merged code now uses
Twenty tests in tests/php failed on master after PRs that each passed on
their own landed together: code under test started calling a helper, or
loading a file, that these tests' stand-ins didn't provide.

- validCardinal(): actions/group.php, actions/controlcap.php and
  ajax/reports.php deleteRequest() reduce request ids with it (#7800).
  The five group save tests, the controlcap test and the reports delete
  test now carry a copy of it.
- ZM\scalar_values_differ(): Object.php changes() compares with it
  (#7774). The group, storage, user and zmtrack tests that load
  Object.php now carry a copy.
- authHashTtl(): generateAuthHash() takes its freshness limit from it
  (#8367). test_auth_hash_slot_age lifts it out of auth.php alongside
  generateAuthHash().
- includes/log_redact.php: ajax/status.php requires it relative to web/
  (#7930). The five status tests put web/ on the include path before
  including status.php, as the web server's working directory does.
- test_reports_ajax_forged_id: deleteRequest() now reports a delete()
  that returns false (#7820), and the stub Report::delete() returned
  nothing, so it returns true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:38:08 -05:00
fe9cae3574 feat: zms quality= sets the JPEG quality of one stream refs #8263 (#8264)
Co-authored-by: Isaac Connor <isaac@zoneminder.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:35:25 -05:00
Harsh Singh be9f0e403b fix: add monitors csv import passes fgetcsv escape explicitly, required from PHP 8.4 (#8383) 2026-11-27 18:34:44 -05:00
Harsh Singh d1f345f467 fix: montage view ignores an array whatDisplay value instead of a TypeError (#8453) 2026-11-27 18:33:39 -05:00
Isaac ConnorandClaude Opus 5.5 01601e20bc fix: only fall back to enabled Storage areas refs #3771 (#8408)
The fallback added in #6665 (Storage::FallbackSql, used when a monitor's
Storage row has been deleted) and the two alternate-area queries in
Event::Run (used when the monitor's area cannot be written) picked any
Storage row, including one an admin had disabled. The monitor form only
offers enabled areas, so the fallback should not choose a disabled one
either. All three queries now require `Enabled`; the remote query is
parenthesised so the filter applies to both of its OR branches.

When no enabled area is found the existing last resort is unchanged: the
event keeps the monitor's own area and logs an Error.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 18:33:08 -05:00
Harsh Singh 848a40b510 fix: training save refuses annotations or a label that is a list instead of a TypeError (#8449) 2026-11-27 18:32:42 -05:00
Harsh Singh 3452c912fa fix: video generation ajax refuses a format, rate, scale or transform it cannot use instead of a TypeError (#8451) 2026-11-27 18:32:21 -05:00
Harsh Singh d02b4fa4de fix: monitor filter bar drops a nested array from a filter list (#8455) 2026-11-27 18:32:05 -05:00
Harsh Singh 1d64d8d23c fix: the 1.31.16 update script skips blank entries in a group's MonitorIds (#8459) 2026-11-27 18:30:56 -05:00
Harsh Singh 7ad36d0b30 fix: API frame add answers a validation error for a nested Type instead of a 500 (#8461) 2026-11-27 18:30:21 -05:00
Harsh Singh 93a7340519 fix: API user preference edit answers 400 for a non-object UserPreference instead of a 500 (#8463) 2026-11-27 18:29:54 -05:00
Harsh Singh 3ca2b3b89f fix: API user preference edit answers a JSON message instead of a PHP warning and template text (#8465) 2026-11-27 18:29:29 -05:00
c2e987c90c fix: device save in the device ajax reports a failed query instead of success refs #7909 (#7910)
Co-authored-by: Isaac Connor <isaac@zoneminder.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 17:31:53 -05:00
Jash Ambaliya c9b6cf98f6 fix: option patterns and hints agree with the values they offer, so the default filter position shows as selected refs #8410 (#8411) 2026-11-27 08:53:26 -05:00
Harsh Singh 927cc342c3 fix: API saves refuse an empty string for a NOT NULL number, date or enum column (#8421) 2026-11-27 08:53:03 -05:00
Harsh Singh 2a33f27d7b fix: validStr gives an empty string for an array instead of a TypeError (#8443) 2026-11-27 08:52:31 -05:00
Harsh Singh fabd8819ae fix: API encoder template index answers 400 for a nested Encoder list instead of a 500 (#8439) 2026-11-27 08:49:57 -05:00
Harsh Singh a741f6164d fix: console sort refuses a monitor order that is not a list instead of a TypeError (#8447) 2026-11-27 08:49:25 -05:00
Harsh Singh aa70bcf8cd fix: device and devices ajax answer an unrecognised action for an array action instead of a TypeError (#8445) 2026-11-27 08:49:10 -05:00
2c32cc6307 fix: keep recording when the Events insert fails, and let zmrecover give the event a normal id refs #7999 (#8409)
* fix: record an event under a time-based id when its insert keeps failing refs #7999

* fix: an event whose insert fails while zmc shuts down records under a fallback id too refs #7987

Event::Event stopped retrying the Events insert as soon as zm_terminate was
set, leaving the event with id 0, so its frames and video were written under
event 0. It now takes the same time-based fallback id it uses after three
failed attempts, so the recording is kept and zmrecover.pl can add it.
Monitor::openEvent never sees an id of 0 any more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: zmrecover gives an event recorded under a fallback id a normal id, and zmaudit keeps it refs #7999

When zmc cannot insert an event's row it records the event under a time-based
id far above the auto increment range. Recovering it as-is would leave that id
in the Events table and push auto increment past it.

ZoneMinder::Event::save_with_new_id() inserts the row without an Id, so it gets
the next auto increment id, then moves the event to match: the Medium or
Shallow directory, the Deep .<id> link or Shallow .<id> file, the
<id>-video.* file, the eid and file name in index.m3u8, DefaultVideo, the
recovered name, and any Frames, Stats, Event_Data, Events_Tags,
Snapshots_Events and Events_* summary rows zmc queued under the old id. If the
directory cannot be moved it removes the new row and keeps the old id, so a
later run can try again. zmrecover.pl saves every recovered event through it
when the id is in the fallback range.

zmaudit deleted the files of any event with no row once it was older than
ZM_AUDIT_MIN_AGE, which would throw away exactly the video the fallback id
exists to keep. It now warns and leaves those events for zmrecover.pl, and its
orphaned Frames, Stats and Event_Data cleanups stop below the fallback range.

The zmaudit and zmrecover tests that replace ZoneMinder::Event with a stub get
the two new names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Jash <jashambaliya1@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:48:23 -05:00
Jash Ambaliya c5370def67 fix: zmc escapes the expanded EventPrefix in the query that closes an event refs #7574 (#7575) 2026-11-27 08:47:34 -05:00
Harsh Singh ebb9b27400 fix: API notification add and edit answer 400 for a non-object Notification and no 500 for a nested Token (#8429) 2026-11-27 08:44:04 -05:00
Harsh Singh c50701129b fix: API monitor add and edit answer a validation error for an array ServerId or StorageId instead of a 500 (#8417) 2026-11-27 08:42:07 -05:00
Jash Ambaliya b7385ba41d fix: a zone whose points are not a polygon says why it was not saved instead of redirecting to the zones list refs #8414 (#8415) 2026-11-27 08:41:52 -05:00
Harsh Singh c3c2823411 fix: api controllers may set components as properties without a PHP 8.2 deprecation (#8431) 2026-11-27 08:41:36 -05:00
Harsh Singh df27d2da28 fix: API model rules answer a validation error for a list instead of a 500 (#8425) 2026-11-27 08:41:17 -05:00
Harsh Singh 8e709bb9d5 fix: API filters answer 400 for a nested array in a named parameter instead of a 500 (#8423) 2026-11-27 08:40:33 -05:00
Harsh Singh fa28222141 fix: API index answers 400 for a list in sort or direction instead of a 500 (#8427) 2026-11-27 08:40:13 -05:00
Jash Ambaliya b5e6456b15 fix: image view turns the frame id into an integer before it builds the file name refs #7636 (#7637) 2026-11-27 08:39:57 -05:00
Jash Ambaliya 86bc64209b fix: image view refuses an event or frame id that is a list refs #7638 (#7639) 2026-11-27 08:39:29 -05:00
Jash Ambaliya 6bdb2f81fd fix: zms keeps an = inside the user, pass and other query values refs #7622 (#7623) 2026-11-27 08:23:26 -05:00
Jash Ambaliya 2225aa0897 fix: EventEndCommand waits for the event's queued Frames and Stats writes before it runs (#7300)
* fix: EventEndCommand waits for the event's queued Frames and Stats writes before it runs refs #7299

* fix: drain waits only for database writes queued before it was called refs #7299
2026-11-27 08:21:51 -05:00
Jash Ambaliya cbb3f6d088 fix: watch sidebar shows 0, not null, for the frame counts of an event that has just started refs #7363 (#7364) 2026-11-27 08:21:11 -05:00
Jash Ambaliya dd883f8839 fix: RTSP2Web live view uses channel 0 for the Restream stream channel instead of a channel 2 that RTSP2Web never has refs #7291 (#7292) 2026-11-27 08:19:39 -05:00
Jash Ambaliya 658df87448 fix: events list sorts by monitor name when the sort field is MonitorName refs #7263 (#7264) 2026-11-27 08:19:08 -05:00
bad3940375 fix: API add and edit answer 400 when the save fails in 13 more controllers, as Users and Notifications do (#7384)
* fix: API add and edit answer 400 when the save fails in 13 more controllers, as Users and Notifications do refs #7383

* test: misc API controllers test gives its stub controller a response, as the controllers now set a status refs #7383

---------

Co-authored-by: Isaac Connor <isaac@zoneminder.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:16:35 -05:00
73aa1f56f7 fix: filter editor keeps every value of a multi-value Monitor, Server, Storage, Zone or Tags term refs #7271 (#7272)
Co-authored-by: Isaac Connor <isaac@zoneminder.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:15:48 -05:00
Jash Ambaliya 03ed383c16 fix: montage layout names are trimmed, so a blank name is refused and padding doesn't get past the preset and duplicate checks refs #7377 (#7378) 2026-11-27 08:15:05 -05:00
39cd3a47c1 fix: an event reopened at a section boundary during an alarm keeps the alarm cause instead of Continuous refs #7279 (#7280)
Co-authored-by: Isaac Connor <isaac@zoneminder.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:14:37 -05:00
7d421e63ac fix: filter editor picks a valid operator when a term's attribute changes to one with fewer operators refs #7269 (#7270)
Co-authored-by: Isaac Connor <isaac@zoneminder.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 08:13:34 -05:00
Jash Ambaliya 51c9a58479 fix: API daemonStatus says a monitor on another server is not local instead of asking the local zmdc refs #7275 (#7276) 2026-11-27 08:13:08 -05:00
IgorA100 caffcbf6ca Fix: Do not display a placeholder image when stream playback is stopped on the Zone page (#7662)
* Modify stop function to include default showImg option

* Modify liveStream to stop monitors with showImg option

Updated liveStream function to stop monitors without showing images.

* Add isLightboxOpen mock function to tests
2026-11-27 08:06:42 -05:00
Harsh Singh d855ed8e0f fix: menu options preview the default icon for an empty font awesome or image name (#7668) 2026-11-26 22:37:56 -05:00
Harsh Singh 9d0b23c158 fix: event view stops resending the zms scale on every status reply when the page scale is over 100% (#7998) 2026-11-26 22:36:34 -05:00
Jash Ambaliya 96b1005063 fix: status ajax hides the userinfo of a monitor's Host, Path and ControlAddress from users who cannot edit it refs #7929 (#7930) 2026-11-26 22:35:51 -05:00
Jash Ambaliya 0d9c9aed55 fix: API storage and event view hide the s3 key and secret in a storage area Url from users who cannot edit System refs #7931 (#7932) 2026-11-26 22:34:08 -05:00
Jash Ambaliya d5eed51d0c fix: API group delete keeps the children where they were when the delete fails refs #7895 (#7896) 2026-11-26 22:33:40 -05:00
Jash Ambaliya 9e2c175b40 fix: reduce request ids to digits before building Report, Group and Control objects refs #7799 (#7800) 2026-11-26 22:33:17 -05:00
6b1bc408c8 fix: FoscamCGI and LoftekSentinel moveStop stops both axes after a diagonal move (#7740)
* fix: FoscamCGI and LoftekSentinel diagonal moves start both directions before stopping refs #7717

* fix: FoscamCGI and LoftekSentinel moveStop stops both axes after a diagonal move refs #7739

---------

Co-authored-by: Isaac Connor <isaac@zoneminder.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 22:20:06 -05:00