Commit Graph

12445 Commits

Author SHA1 Message Date
Isaac Connor 2d75ab50af Implement deleting from Logs based on line count instead of interval 2019-02-28 16:12:34 -05:00
Isaac Connor 20fe502ca4 Add ZM to ErrorHandler. Spacing and quotes 2019-02-27 12:02:40 -05:00
Isaac Connor a1f1c19c0f fix missing ZM namepsace 2019-02-27 11:07:52 -05:00
Isaac Connor 6e4444099b Only populate session with user info on successful login. Use parameters in sql when loading users in getAuthUser. Fixes #2542 2019-02-27 09:57:50 -05:00
Isaac Connor 92ded81e26 bump version 2019-02-27 09:29:27 -05:00
Isaac Connor 804c384b4c add Event Notification support to server 2019-02-27 09:29:11 -05:00
Isaac Connor a7ca75758b add Event Notification label 2019-02-27 09:29:00 -05:00
Isaac Connor c0ae7820bb add zmeventnotification to Server object 2019-02-27 09:28:36 -05:00
Isaac Connor 849442502c add support for server based zmeventnotification 2019-02-27 09:28:15 -05:00
Isaac Connor 053289c4a0 rename eventserver to eventnotification 2019-02-27 09:27:50 -05:00
Isaac Connor 4c35f2910c fix ZM namespace 2019-02-26 18:09:18 -05:00
Isaac Connor df3e11d83c Fix authentication in api because we no longer store the user object in the session 2019-02-26 17:01:45 -05:00
Isaac Connor 92dc7878de
Fix 2340 (#2368)
* include includes/functions.php so that we have access to all it's contents

* add a beforeDelete function which deletes the files.  Add other needed functions like Path() LinkPath() etc.

* add require_once for Storage and functions because we use them in Event

* Now that ZM has namespaces use the ZM Event class to do the heavy lifting of delete

* Don't need functions in AppController anymore
2019-02-26 11:28:56 -05:00
Isaac Connor 53c0fae688 Merge fix from storageareas for archive/delete in events list 2019-02-26 10:22:58 -05:00
Isaac Connor db58352bff Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2019-02-26 10:17:59 -05:00
Isaac Connor 705468dfc4 if we don't have a connkey, comms will not be open so don't touch the sock file or call checkCommandQueue 2019-02-26 10:08:07 -05:00
Isaac Connor 627e9f74cf fix spacing 2019-02-25 15:24:25 -05:00
Isaac Connor 2187dea2aa add namespace to Warnings 2019-02-25 15:11:08 -05:00
Isaac Connor cbd8ee80f8 add namespace for Monitor 2019-02-24 12:40:40 -05:00
Isaac Connor 3b06f3015a redirect to console of successfullogin takes us to login 2019-02-24 10:07:42 -05:00
Isaac Connor dd590aa729 remove warning when QUERY_STRING is not set 2019-02-24 10:05:45 -05:00
Isaac Connor 46c6735311 Missing namespace on filter. Fixes #2541 2019-02-24 10:02:49 -05:00
Isaac Connor 45778384a6 Merge branch 'release-1.32' 2019-02-22 11:24:23 -05:00
Isaac Connor 9a2dd06e1d Fix use of empty which isn't supported in old php. Remove the code entirely as I think it was just cutnpasted from somewhere else. We don't care if it is a new server or not in the validate code.
Fixes #2540
2019-02-22 11:22:44 -05:00
Isaac Connor 5098329d94
remove ob_clean stuff which logs errors when output buffering is turned off (#2395)
* remove ob_clean stuff which logs errors when output buffering is turned off.

* Don't ob_clean because if buffering is off php will output an error
2019-02-22 09:58:16 -05:00
Isaac Connor 443fd35d99
Fix imagesize requirements (#2404)
* introduce non-loop-unrolled version of function and use them when the image size is not a multiple of 12 or 16

* Remove tests for imagesize being a multiple of 16 or 12 to handle functions with unrolled loops

* Use non-unrolled functions when image size is not a multiple of 12 or 16

* use std_blend when image is odd size
2019-02-22 09:44:57 -05:00
Isaac Connor 2b90bf15a6
Improve session (#2487)
* Introduce ZM_COOKIE_LIFETIME which sets the life of the SESSION cookie, instead of using what is in php.ini

* Use zm specific session functions, which are now located in includes/session.php.  Be more agressive about clearing session on logout.

* Move session code to includes/session.php

* remove duplicate line

* Move is_session_open to session.php.  Move code to clear a session into session.php

* improve debug line when there is a problem updating config entry

* split description into description and help text for COOKIE_LIFETIME

* Remove redirect on line.  We do it in javascript on postlogin view so that we can say logging in before switching to console

* If there is a username in the session, then we are logged in, but we need to load the user object from the db.  We can't just trust it from the session. The user may have been deleted and having that data in the session can be a security risk. So load the user object on every request.

* Use session_regenerate_id instead of our broken code to do the same

* Move auth code to includes/auth.php

* add autocomplete tags to username and password inputs

* Don't redirect to login if we are already viewing login.  Put auth before including skin includes

* need to include session.php in auth.php

* update to php namespace
2019-02-22 09:43:38 -05:00
Isaac Connor 0a7667f2d0
Use buttons instead of divs and inputs (#2522) 2019-02-22 09:23:06 -05:00
Isaac Connor 410cb70ddb
get rid of js that just does the form submit. Upgrade the button from an input to a button. Use 0 and 1 instead of accept and decline, which allows us to pre-select the current value of ZM_TELEMETRY_DATA. So that if you had previously declined, you won't accidentally accept. This fixes the reported error that choosing decline would cause the setting to not be saved and the privacy popup to happen again. (#2534) 2019-02-22 09:20:54 -05:00
Isaac Connor 8dd8888975
Php namespace (#2537)
* experiment with namespaces on the Server class

* experiment with namespaces on the Server class

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects

* Implement the ZM namespace on objects
2019-02-22 09:19:07 -05:00
Chris b8117f7fc9 Add support for control of Amcrest cameras (#2536)
* Add a control module to support the current Amcrest HTTP API

This patch adds ZoneMinder::Control::Amcrest_HTTP

This module is adapted and improved from one available on the ZoneMinder
forums.[1] It appears that a number of individuals have contributed to
it. This is an attempt to correct some of its interactions with ZM::Control
and friends as well as enhance and extend supported control features
for Amcrest cameras.

This work is based on Amcrest HTTP Protocol API Specifications
Rev. 2.12 2017-03-15

[1]https://forums.zoneminder.com/download/file.php?id=1878

* Fixing zoom methods

* Misc. cleanup of comments, etc.

* Fixing up POD, etc.

* Converting line endings to Unix

* Fixing up preset methods

The current Amcrest HTTP API does not support a Home command per se. So this
method is set up to send the camera to the first preset position. Of course,
this presupposes that the user will setup a preset #1 otherwise the command
will fail on a bad preset error.

If a future version of the API supports a true Home command, we'll adjust
at that point. For now this seems to be a useful workaround.

* Removing duplicate home method

* Adding moveAbs method

I'm putting this in, but absolute camera movement does not seem to be well
supported in the classic skin ATM. Reading
www/skins/classic/include/control_functions.php seems to indicate
a faulty implementation, unless I'm reading it wrong. I see nowhere
where the user is able to specify the absolute location to move to. Rather,
the call is passed back movement in increments of 1 unit. At least with the
Amcrest/Duhua API this would result in the camera moving to the 1* or 0* etc.
position.

moveAbsUp, Down, Left, Right, etc. Doesn't make sense given the definition
of Absolute movement.

* Adding a note about the moveMap method

This method does not appear to be implemented in the classic skin,
but we'll leave it here for future implementation. Caveat: It may
or may not work as-is.

* Fixing up zoomConTele/Wide methods

* Adding a vanilla control type for the Amcrest HTTP API

Please note that this control type matches (mostly) the currently
available control options in Amcrest_HTTP.pm. It does not match
all (or possibly any) of the control options available on a specific
Amcrest camera. The user may need to create their own control type
specific to the camera model they are using.

* Removing misplaced comment

Thanks to connortechnology for pointing this out!
2019-02-22 09:17:28 -05:00
Isaac Connor e087522203 remove debug 2019-02-21 14:15:10 -05:00
Isaac Connor 5d4c332dc7 Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2019-02-20 15:39:36 -05:00
Isaac Connor d93924bd89 increase width of controls popup. 2019-02-20 15:39:26 -05:00
Pliable Pixels b3e20c6c50 fix slack join link (#2535)
Slack allows its own join portal. I created a permanent link we can use instead of the 3rd party heroku app which is slow
2019-02-20 11:21:15 -05:00
Isaac Connor 8837015239 remove bogus test for Filter Id 2019-02-19 13:54:25 -05:00
Isaac Connor eaa7341935 Add missing / in path to auth.php 2019-02-19 10:07:36 -05:00
Isaac Connor 87988185e5 remove data-on-click-this from markEids[] because we have an onclick bind in initPage 2019-02-19 09:58:03 -05:00
Isaac Connor 4cd3a93e96 add missing / 2019-02-18 16:30:03 -05:00
Isaac Connor f557df9fc9 remove extra affect 2019-02-17 17:34:38 -05:00
Isaac Connor c6afe906ac Merge branch 'master' of github.com:ZoneMinder/ZoneMinder 2019-02-17 17:33:28 -05:00
Isaac Connor 9996b3e718 Merge branch 'master' into break_videostorage 2019-02-17 12:10:32 -05:00
j-marz bd7ce6ba13 fixed more more typo in options_logging userguide (#2526) 2019-02-17 11:32:10 -05:00
Mitch Capper b646284da3 don't quote dbEscape values it will quote it already (#2529) 2019-02-17 11:31:28 -05:00
Mitch Capper 04c17283ec need to prefix with _dir_ otherwise relative to initial script (#2531) 2019-02-17 11:31:10 -05:00
Isaac Connor 34873d5636 We must leave ZM_HOME_CONTENT unescaped so that we can insert actual html like image tags 2019-02-16 11:50:09 -05:00
Isaac Connor 96906734b8 add an audio_fifo to handle input audio < 1024 samples per frame 2019-02-15 17:26:30 -05:00
Isaac Connor 4e463c9354 use swr_convert_frame instead of swr_convert 2019-02-14 17:48:58 -05:00
Isaac Connor 281775cc80 try setting out_frame pts from in_frame 2019-02-14 15:54:47 -05:00
Isaac Connor 62bf7d54f1 close sth's on Fatal to prevent error message 2019-02-14 15:40:42 -05:00