Commit Graph

426 Commits (openbsd)

Author SHA1 Message Date
Joe 87f09d3b7e Fix usage of unset variable
If daemon or args are unset the preg_replace is never called which can
result in count not having a value when referenced in the if statement.
This generates a warning in error.log.
2023-08-13 17:56:55 -07:00
Isaac Connor 0afa383c38 Info to Debug for login. 2023-08-08 14:24:36 -04:00
Isaac Connor 8a00be8cc8 Load the ZM::Event using the Event Model data instead of loading by Id which goes back to db. 2023-06-09 10:53:10 -04:00
Isaac Connor c811f1bc90 Load event using find_one which does caching. 2023-06-09 10:52:39 -04:00
Isaac Connor 54373e4e85 It is not necessary to escape the field as cakephp will do it for us 2023-05-12 15:07:28 -04:00
Isaac Connor 494be9c0ef Add named parameter filtering to Storage controller 2023-05-12 14:10:53 -04:00
Isaac Connor 4472269f3c Finish roughing in UserPreference in api 2023-05-12 14:10:53 -04:00
Isaac Connor 0d561bbf73 Add StartTimeSecs and EndTimeSecs to returned data in Event 2023-05-12 14:10:53 -04:00
Isaac Connor 6e8347c693 Use viewableMonitorIds instead of deprecated MonitorIds 2023-05-12 08:59:36 -04:00
Isaac Connor 49014ac7fa replace MonitorIds with viewableMonitorIds 2023-04-24 13:53:14 -04:00
Isaac Connor e754c2093d Fix another user as array use 2023-04-24 13:09:40 -04:00
stefan 1bd9def63e [API] Fix User variable from array to object
Fix $user variable from array to object to make API work again.
2023-04-23 22:07:24 +02:00
Isaac Connor dd6cc74da7 Rough in UserPreference api 2023-03-22 13:22:08 -04:00
Isaac Connor aac9c644fb Merge branch 'master' of github.com:ZoneMinder/zoneminder 2023-02-28 14:06:16 -05:00
Isaac Connor d75364ff53 Need to always include auth.php, as it has functions like canView 2023-02-27 17:02:23 -05:00
Isaac Connor 82491b3d81 Addd server_stats route 2023-02-27 10:59:14 -05:00
Isaac Connor 8a6f0cbe1b Add ServerStats to api 2023-02-26 17:04:05 -05:00
Isaac Connor 79d19c21d1 Update validating access to Monitors, using canView due to Monitor and Groups permissions 2023-02-25 16:13:39 -05:00
iconnor@connortechnology.com 155502ee32 Must include Storage.php 2023-02-25 13:02:29 -05:00
iconnor@connortechnology.com a7743dd0ed Add DiskTotalSpace and DiskUsedSpace to returned Storage objects 2023-02-25 13:02:19 -05:00
Isaac Connor 00234fbb20 Attempt to sanitize daemon and arguments before executing commands to prevent executing other programs. 2023-02-20 11:53:32 -05:00
Isaac Connor 55041043f2 Put back to 3.0 2023-02-01 14:34:05 -05:00
Andrew Bauer 700c672cbd update ZM_TARGET_DISTRO description 2023-01-29 14:49:54 -06:00
Isaac Connor aa3bc1a28d Add TimeStampSecs to fields returned for Frames. 2023-01-18 10:07:41 -05:00
Isaac Connor 662aa9f39d Add getting frames by event id or other named filters to api 2023-01-09 16:53:27 -05:00
Isaac Connor 7fe10a4047 Fix the HABATM relationship in Snapshots 2022-12-07 15:01:08 -05:00
Isaac Connor 57d208efa9 Make view and listing of snapshots be recursive so they load the Events as well 2022-12-07 15:00:48 -05:00
Isaac Connor b2c19e3db1 add the add view for snapshots 2022-12-07 14:15:39 -05:00
Isaac Connor b3cd07e9b8 Add snapshots route 2022-12-07 14:14:00 -05:00
Isaac Connor c35b28a3d1 Rough in api support for snapshots 2022-11-30 15:11:04 -05:00
Isaac Connor e11b7d3406 Add CORS headers to API 2022-11-30 13:18:13 -05:00
Isaac Connor e949a5554f Must convert strings into integers before doing math as of php 8.2 Fixes Unsupported operand types: string - int 2022-11-17 14:54:05 -05:00
Isaac Connor 0515a1ba74 implode the output from zmu to fix php complaint abou array to string conversion 2022-11-17 14:53:56 -05:00
Isaac Connor c20a327eef Fixups to EventData model 2022-10-27 17:00:24 -04:00
Isaac Connor 8a5e9d944d Add authentication to FramesController 2022-10-27 16:59:34 -04:00
Isaac Connor 46fcd79881 Add authentication and fixups to EventDataController.php 2022-10-27 16:59:18 -04:00
Isaac Connor 70b0e53780 Add routing for EventData 2022-10-27 16:58:57 -04:00
Isaac Connor 6d073119cb Rough in views for EventData 2022-10-27 16:57:05 -04:00
Isaac Connor 586d43798f Rough in model and controller for Event_Data 2022-10-27 14:47:21 -04:00
Isaac Connor 09b2b372ff Test for matches[operator]. Fixes #3607 2022-10-11 15:52:46 -04:00
Isaac Connor 34ffd92bf1 Add permissions checking to API/Logs. Fixes unprivileged user being to add/edit/delete/view logs. 2022-10-06 16:22:56 -04:00
Isaac Connor 460695202f Add Janus_Pin to monitor API 2022-09-28 18:35:30 -04:00
Pliable Pixels 23ae004724 whoops fixed errant enum values I forgot to delete 2022-09-25 17:46:53 -04:00
Pliable Pixels 6218d065a5 make OutputCodec work in API 2022-09-25 12:41:07 -04:00
Isaac Connor 363c589975 More properly fix the alarm status api changing. The previous hack broken doing alarm on/off. 2022-09-21 14:35:27 -04:00
Isaac Connor 834dc3c986 Restore status value to pre 1.36.16 value by substracting 1. So Unknown == -1, 0 = IDLE etc. Fixes #3584 2022-09-08 13:01:45 -04:00
Isaac Connor 74aab0a76e Prevent editing of system config entries through the api 2022-05-30 10:02:49 -04:00
Isaac Connor 2a5a94b995 Fix monitors.json and monitor/.json use incorrect Id (mathing Monitor.Id instead of Monitor.ManufacturerId) to return Manufacturer and CameraModel: Fixes #3475 2022-05-01 13:25:42 -04:00
Isaac Connor 5312d11e78 Don't both running zmu if monitor Function is set to None 2021-12-10 16:08:43 -05:00
Isaac Connor ee65d3e3dc add cmaeramodels route 2021-09-27 10:57:06 -04:00