Commit Graph

53 Commits

Author SHA1 Message Date
Isaac Connor 8a170f2841 Remove Debug 2020-08-15 17:49:26 -04:00
Isaac Connor 25426d5fdd Don't add 442 for https and 80 for http. Just cleaner 2020-08-09 22:18:35 -04:00
Isaac Connor cc6d40d67e Missing -> 2019-12-07 10:38:51 -05:00
Isaac Connor 1dc83700c0 Do a better job of handling the non-server, non-multiport case. Put the code in Url so that it works for other functions that call Url() 2019-11-21 13:32:27 -05:00
Isaac Connor 59b9220ddd if doing multiport still call Url(), as it requires a hostname 2019-11-11 13:33:54 -05:00
Isaac Connor d218d2ee9f If the default server case, don't add the Url component. So this will return just the path, using whatever servername/port combo is currently in use. Fixes #2750 2019-11-04 12:04:23 -05:00
Isaac Connor b15f7ad47d handle ipv6 in Server->Hostname. Fixes #2713 2019-10-09 10:00:13 -04:00
Isaac Connor a05c513643 Revert change breaking multiport when servers not defined. 2019-09-23 12:03:19 -04:00
Isaac Connor 0a0bb1b326 Update Frame and Server Objects to use common methods 2019-09-19 16:24:05 -04:00
Isaac Connor 60cf4586da Don't return a hostname when not in multi-server. Should prevent problems with reverse proxies 2019-09-15 17:54:23 -04:00
Isaac Connor c0ae7820bb add zmeventnotification to Server object 2019-02-27 09:28:36 -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
Matthew Noorenberghe a97711de89 Replace or sanitize remaining uses of PHP_SELF. Fixes #2446 2019-02-09 22:12:36 -08:00
Isaac Connor eee1d871e0 get rid of default value for PathToIndex so that it will use PHP_SELF instead 2019-01-16 12:09:26 -05:00
Isaac Connor 3182d8bab7 implement to_json method so that defaults get included 2019-01-15 11:36:56 -05:00
Mike Rosack 567b60ffa7 support for forwarded proto/port in Server.php (#2343) 2018-12-13 10:24:32 -05:00
Isaac Connor a1141d2dc4 remove second use of HTTP_HOST and use a better method of stripping off port from HTTP_HOST 2018-12-07 08:39:23 -05:00
Isaac Connor 757e538550 strip port from HTTP_HOST 2018-12-06 17:12:03 -05:00
Andrew Bauer cae6ffd5a3 use HTTP_HOST instead of SERVER_NAME 2018-12-01 13:27:08 -06:00
Isaac Connor 8c626c984b Need to pass port through all Url functions 2018-11-30 14:45:58 -05:00
Isaac Connor 3bd5774ea1 Default to PathToIndex should have the index.php in it 2018-11-29 15:53:19 -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 f8b2ff5c77 rework from Url() to PathToIndex(), PathToZMS(), UrlToIndex() and UrlToZMS() 2018-11-27 17:35:25 -05:00
Isaac Connor c5f7fb7b18 Merge branch 'master' into server_path_prefix 2018-11-22 10:04:33 -05:00
Isaac Connor f9b1453705 Include SERVER_PORT when not doing multi-server or multi-port but are running on a port other than 80. 2018-10-19 10:59:16 -04:00
Isaac Connor 52b1439d51 fix the lack of /zm/index.php in url in Server->Url() and multiport 2018-10-08 09:55:47 -04:00
Isaac Connor 1eb8e9ed9e Include PHP_SELF in url to Server. This will assume that all servers in a multi-server setup use the same path 2018-10-08 09:45:03 -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 b4f80fbe11 Always return an array from find 2018-09-09 13:56:29 -04:00
Isaac Connor dfdac2ed70 make find and find_one functions consistent across Objects 2018-09-07 16:31:11 -04:00
Isaac Connor 3ecf0055b5 spacing 2018-07-09 13:07:16 -04:00
Isaac Connor 62f45b430e Add PathPrefix and use it in Url. Make Url() smarter so it can do more of the heavy lifting. 2018-07-09 12:09:57 -04:00
Isaac Connor 9fa28106e5 return proper hostname when not using multiple servers 2018-02-12 14:44:58 -05:00
Isaac Connor 1fbb5bc0f8 Fix zmaudit.pl => zmaudit, etc. 2018-01-17 14:22:04 -05:00
Isaac Connor 9284e26512 get rid of the snapshot setting. If we aren't storing all frames, then we should always store the snapshot. 2018-01-13 15:15:14 -05:00
Isaac Connor 821f9f8e6e Merge branch 'fix_sql_injection' into storageareas 2016-12-08 15:58:10 -05:00
Isaac Connor b5e4c94682 test for integer string as well 2016-12-08 15:58:00 -05:00
Isaac Connor ced701f56f Merge branch 'fix_sql_injection' into storageareas 2016-12-08 14:58:50 -05:00
Isaac Connor e7d0861530 check limit for a valid integer and complain if not. 2016-12-08 13:37:23 -05:00
Isaac Connor 6204ed8dd4 correct incorrect use of isset instead of array_key_exists 2016-08-30 13:43:49 -04:00
Isaac Connor c050969141 Merge object model classes from storageareas 2016-05-05 15:33:28 -04:00
Isaac Connor f5db14d823 return empty for the non multi-server case 2016-01-04 13:46:05 -05:00
Isaac Connor c639822d62 When Server is not set, us ZM_BASE_PATH 2016-01-03 11:55:53 -05:00
Isaac Connor 12ee147bc7 Add a find_all function to return an array of Server objects 2015-12-31 10:13:48 -05:00
Isaac Connor aaa9f3bcc9 Handle case where parameter is not passed to constuctor 2015-12-15 11:19:50 -05:00
Isaac Connor a799a1ce79 Make Server constructor take a row or an id 2015-12-02 10:04:47 -05:00
Isaac Connor 2dfa6d6bae add Url and __call functions 2015-12-01 15:16:07 -05:00
Isaac Connor 2237391876 white spacing, and fix loading of Server objects in monitor 2015-10-15 09:28:35 -04:00
Isaac Connor 6570a8d855 fix Server->Hostname() 2015-10-02 18:22:19 +00:00
Isaac Connor 00ef849908 fix line testing for Hostname 2015-10-02 15:29:17 +00:00