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>
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>
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>
* Enhance wallclock timestamps label with help link
Added help link for wallclock timestamps option.
* Добавить опцию для временных меток в записи видео
Добавлена опция для настройки временных меток при записи видеофайлов, с объяснением ее работы и ограничений.
* Add help text for OPTIONS_WALL_CLOCK_TIMESTAMPS
* 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>
* 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
* 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>
* 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