Commit Graph

87 Commits (a2cf001f6663f29dec433bd12f1c7eefad42682f)

Author SHA1 Message Date
Isaac Connor 7515711eb8 Implement Server function which figures out which Server likely has the video. Use it to remove duplicate logic 2022-02-03 14:45:17 -05:00
Isaac Connor 193f349e38 implement Event::canEdit 2021-11-12 13:37:01 -05:00
Isaac Connor b9efe627f3 implement Event->canView 2021-08-18 10:53:59 -04:00
Isaac Connor 973533c809 Use method to handle case where Event wasn't found 2021-01-25 18:39:57 -05:00
Isaac Connor 2d33dd5386 Rename StartTime, EndTime in Events to StartDateTime and EndDateTime 2020-11-04 13:52:32 -05:00
Isaac Connor 10c0a6617c Return Debug to a regular function to match other logging functions. Since we switched to using namespaces we no longer clash with cake_php. 2020-10-14 10:39:25 -04:00
Isaac Connor c934dee233 Do not allow the deleting of Archived Events 2020-09-03 17:02:48 -04:00
Isaac Connor d0f6f8755c Implement a remove_from_cache function so we can free mem for objects we are not interested in 2020-08-27 17:14:47 -04:00
Isaac Connor d2b7aa3e90 Populate Scheme of default Storage Area when event Storage is not valid 2020-08-17 16:55:29 -04:00
Isaac Connor da757d075b Only save the DiskSpace on completed events. Fixes #3007 2020-08-07 09:53:35 -04:00
Isaac Connor 7fd038d99b spacing and quotes 2020-07-22 17:28:12 -04:00
Isaac Connor 54a6dfff66 API on remote server requires RELAY not be none. Log an error. Fix url being ruined by auth credentials 2020-02-25 17:12:48 -05:00
Isaac Connor 6cf448c74e remove debug and spacing 2020-02-25 11:08:23 -05:00
Isaac Connor 9036b6db77 fix typo 2020-01-13 16:17:39 -05:00
Isaac Connor f7e2359818 Implement a clear_cache function so that we can free up cached objects 2020-01-13 10:57:56 -05:00
Isaac Connor 4632bbd124 Apply relevant changes to deal with php7,4 deprecations 2019-12-07 11:45:32 -05:00
Isaac Connor c24fc6c21f Set Delta to 0 to avoid errors 2019-09-28 14:10:11 -04:00
Isaac Connor ad84736cb4 spacing 2019-09-17 12:07:24 -04:00
Isaac Connor 8103156436 when deleting multiple events, each event has to be it's own transaction due to locking 2019-09-09 09:16:52 -04:00
Isaac Connor dde655950f Use locking when deleting an event 2019-09-04 10:07:17 -04:00
Isaac Connor a4b057fa2b Upgrade Event object to use the common Object methods. Add deleting files from Secondary storage 2019-08-29 11:25:37 -04:00
Isaac Connor 58851d23d2 Add Secondary Storage support to the Event object 2019-07-24 11:22:55 -04:00
Isaac Connor d244aadee6 Fix #2655 2019-07-08 14:27:49 -04:00
Isaac Connor 2fc7b3cf4d Don't allow deleting of in-progress recording 2019-05-24 09:31:48 -04:00
Isaac Connor 15fb546e15 spacing 2019-04-01 11:13:35 -04:00
Isaac Connor 4eafc52955 spacing 2019-03-25 12:18:01 -04:00
Isaac Connor 72b87a7c00 Add code to be a bit more careful about not deleting all events when an incomplete event object is used. 2019-03-19 09:36:58 -04: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 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
Andrew Bauer a029909972 fix path to thumb and anal images (#2367) 2018-12-28 10:46:13 -05:00
Isaac Connor 1c17f334d3 fix missing bits. Implement UrlToIndex in Monitor and fix use of Url(). Implement PathToApi as well 2018-11-29 14:26:30 -05:00
Isaac Connor c5f7fb7b18 Merge branch 'master' into server_path_prefix 2018-11-22 10:04:33 -05:00
Isaac Connor 95a6d0666a Improve behaviour and reduce extra logging when db goes away 2018-10-29 09:59:26 -04:00
Isaac Connor c6e953c4a9 if Monitor is not found, return empty Monitor instead of null 2018-09-20 09:02:20 -04:00
Isaac Connor c4108a2610 Fix missing quotes inc Event::Monitor 2018-09-20 08:59:15 -04:00
Isaac Connor b0c555599c Merge updated objects from sa. Implements caching of objects and fixes logged errors when using the default storage group. Fixes #2209 2018-09-15 09:42:59 -04:00
Isaac Connor 55dcb161ae find should always return an array 2018-09-09 13:59:10 -04:00
Isaac Connor dfdac2ed70 make find and find_one functions consistent across Objects 2018-09-07 16:31:11 -04:00
Isaac Connor 90e4c2632d Use Server->Url() more,, moving the logic into Server->Url() 2018-07-09 12:08:50 -04:00
Isaac af63619ce6 Fix Messages=>Messaged 2018-05-15 21:56:17 +02:00
Isaac Connor b20cb5d0ae Add all the other Event columns to fields 2018-05-11 10:36:14 -04:00
Isaac Connor 62edca6dcb add fileSize to the api, and use it to add remote fileSize reporting in includes/Event 2018-05-08 13:33:56 -07:00
Isaac Connor 9127eb63dc Implement file_exists function to determine either locally or through remote api calls whether the file for an event exists. 2018-05-07 14:07:30 -07:00
Isaac Connor 769d4a8693 DB connect can die, so put it in an eval 2018-05-03 09:50:54 -07:00
Isaac Connor f76827a450 redo thumbnail code. Always link to server they event is located on 2018-05-03 09:36:50 -07:00
Isaac Connor a4da624f4c break out of loops when zm-terminate is set 2018-04-27 13:20:38 -07:00
Isaac Connor 9de3c44702 Add find_one and caching 2018-04-20 14:23:04 -04:00
Isaac Connor 196b8c52dc Apply multiport to event viewing as well 2018-04-17 12:35:59 -04:00
Isaac Connor bef7098cb4 Fix Event->Storage() 2018-04-15 10:26:38 -04:00
Isaac Connor ce5e484f2a Work harder to ensure we return a Storage object 2018-04-14 21:50:27 -04:00