Instead of wrapping entire class declarations and usage sites in
#if HAVE_LIBCURL, each inner class (AmcrestAPI, RTSP2WebManager,
Go2RTCManager, JanusManager) now has the guard inside the class body
with #else stubs. This makes zm_monitor.cpp completely free of
HAVE_LIBCURL guards.
Stub behaviour when curl is absent:
- isHealthy() returns true (avoids recreation loop in Poll)
- isAlarmed() returns false (no spurious triggers)
- check_*() returns 1 (no-op, avoids re-add loop in Poll)
- all other methods are no-ops / return 0
refs #4967
Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
The download was failing because click_download() sent both the form's
filter (containing StartDateTime terms) AND separate minTime/maxTime
fields. In download.php, the has_term check only looked for 'DateTime'
not 'StartDateTime', so a duplicate conflicting constraint was added.
Remove the redundant minTime/maxTime/minTimeSecs/maxTimeSecs from
click_download() since the filter already carries the time range.
Remove the dead/conflicting handling in download.php.
refs #4774
Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
Prevents 'Undefined property' PHP warning when the Monitor object was
loaded from a database that doesn't yet have the ModelId column. Matches
the existing property_exists pattern used later in the same method.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add dedicated documentation page for the zma binary covering synopsis,
all command-line options, operating modes (update-existing vs create-events),
save-analysis functionality, and usage examples. Add zma entry to the
components page and user guide toctree.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
getpid() requires explicit inclusion of <unistd.h> on FreeBSD where
transitive includes from other headers are not guaranteed.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The catch block for the strict-mode arguments.callee TypeError
doesn't need the exception object since the failure is expected.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace manual eventData construction with $Event->to_json()
- Remove unused zm_session_start()/session_write_close() from training view
- Delete zm_update-1.39.1.sql migration (zmupdate.pl -f handles Config
entries via ConfigData.pm)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When cameras use HTTPS with self-signed or invalid certificates, LWP's
default SSL verification causes connection failures. Add automatic
fallback to all three HTTP methods (get, put, post) in the base Control
class: if a request fails with an SSL/certificate error, disable
verification and retry. Once disabled, the relaxed setting persists for
the rest of the control session via the ssl_verify_disabled flag.
This follows the pattern already used in Dahua.pm and
TapoC520WS_ONVIF.pm but applies it universally so all control modules
benefit without needing individual SSL handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ESLint 9 ignores the --ext flag, so the old --ext .js.php,.js had no
effect. The flat config's **/*.*php glob matched all .php files, not
just .js.php. Add explicit files pattern to the main config block and
narrow the PHP override from **/*.*php to **/*.js.php. Remove the
now-ignored --ext flag from CI and docs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>