Commit Graph
67 Commits
Author SHA1 Message Date
frytimo 0882b148ec Check outbound_proxy and server_address for array with drop-down field (#7343)
- Check the outbound_proxy_primary and outbound_proxy_secondary default value for an array value so the drop-down field on the device edit page can be filled.
- Use a variable to get the value from the settings class for server_address_primary and server_address_secondary instead of calling the settings class three times for each value.
2025-03-28 10:50:43 -06:00
frytimo 0e143764e8 Sets the default value for Limit Max field when adding a new extension (#7342) 2025-03-28 10:49:47 -06:00
frytimo 00c6befb70 Add missing file path when cache miss in auto_loader (#7339) 2025-03-27 13:33:36 -06:00
frytimo b5af974d34 Add backslash to the trim command (#7338) 2025-03-26 14:56:55 -06:00
frytimo c165afc53e Fix trim command on interface name (#7336) 2025-03-26 13:11:37 -06:00
frytimo 2ae77071e2 Fix call recordings maintenance path (#7334) 2025-03-25 14:44:20 -06:00
frytimo 52d8f436e4 Replace session variables with the settings class (#7271) 2025-03-21 20:11:44 -06:00
frytimo d3cedcf17f Add wifi function enabled (#7333)
* add wifi function enabled
2025-03-21 18:02:54 -06:00
frytimo 449b689840 Fix wifi function enabled (#7332) 2025-03-21 17:50:01 -06:00
frytimo a5e63e0fce unset the parameters array (#7331) 2025-03-21 10:53:46 -06:00
frytimo b82d9f17a7 Fix exception thrown for order by used in count devices clause (#7330) 2025-03-21 10:33:22 -06:00
frytimo 891e9e3dfa Use auth_id instead of user_id for pcode 36 (#7329) 2025-03-21 09:44:36 -06:00
frytimo 64a8715245 Fix user id instead of auth id used in grandstream template (#7326) 2025-03-20 23:51:03 -06:00
frytimo 6d356194ba Ensure apcu_cache_info function is available before calling (#7323) 2025-03-17 14:58:36 -06:00
frytimo 1572c76963 Use regex in autoloader instead of include (#7322) 2025-03-17 10:01:11 -06:00
frytimo ad1ba95566 Fix undefined constant error when flushing cache (#7321) 2025-03-17 10:00:25 -06:00
frytimo 0a42d8f198 Add caching to the auto_loader for interfaces (#7320)
* update auto loader to load and cache interfaces

* use new method to update the auto loader cache

* use new interface

* use new interface to trigger a cache flush

* update the console upgrade menu

* update the missing implements syntax

* add the clear_cache to the flush cache button
2025-03-15 09:13:36 -06:00
frytimo 99b3100ee9 fix typo in require.php file (#7319) 2025-03-14 22:55:00 -06:00
frytimo 77d2b3099a Create get methods for domain_uuid and user_uuid (#7144)
* create get methods for domain_uuid and user_uuid
2025-03-13 14:32:51 -06:00
frytimo bed7c8827f fix missing quotes on parameter default value (#7310) 2025-03-12 20:50:14 -06:00
frytimo 08001488f4 Allow namespace in auto loader (#7307)
* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove class_exists wrapper for class definitions

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove include statement of class file

* remove closing tag

* remove invalid method params

* remove closing tag

* remove closing tag

* Update auto_loader to load each class file in the project
Update the auto_loader class to use an include statement on each file in the project to load the class within the file. This will allow mismatched names within the file to be loaded and mapped according to the declaration instead of the filename. The class is then checked against the parsed classes from the PHP engine so that namespaces are available and mapped to the file they were declared in. An update was also made to the search algorithm used to find a file that was not already loaded by collapsing the array to have only valid matches to increase performance on a cache miss. Logging within the auto_loader has been moved to a function.
Multiple files were modified to allow the include statement. When the class has the `if(class_exists())` statement, the auto_loader is called to check for the class. This caused an infinite loop scenario so all wrappers have been removed. The auto_loader will now break the loop by directly modifying the internal classes array instead of trying to restart with the 'reload_classes' method.

- APCu is used to cache classes so any loading of the classes is done only once. To clear the APCu cache, restart php-fpm or call the auto_loader::clear_cache() function.
- Cache file is used when APCu is not available. To clear the cache remove it from the tmp folder or call the auto_loader::clear_cache() function.
- All classes must no longer have a class_exists wrapper to benefit from the performance boost.
- Classes should not be directly included when the auto_loader is used.

* remove include statement of class file

* Update destinations.php
2025-03-12 13:55:47 -06:00
frytimo da6471df5f Optimize require.php (#7286)
Load the auto_loader first
Use config object to find config.conf file and declare global
Use database object and declare global
Use settings object and declare global
2025-03-11 14:37:31 -06:00
frytimo fbeb65428e fix bug for registration count (#7293) 2025-03-06 15:46:17 -07:00
frytimo e9739d2b06 Use single event socket object in registrations class (#7288)
* Use single event socket object in registrations class
Allow passing an event_socket in the constructor
Ensure the event_socket is connected before using it in loops
2025-03-05 10:08:08 -07:00
frytimo 1aa1eb6159 Use text instead of boolean for ace editor settings (#7285) 2025-03-04 16:30:17 -07:00
frytimo d529021b3f Use boolean setting as true boolean (#7284)
* use boolean setting as true boolean

* Update settings class to use the php filter_var function for boolean
Using the built-in filter type for boolean seems like a better option as they are faster, already hardened, and more widely tested.
I found this better method used originally by Mark J. Crane in 2022 in the content.php page so I included it here.

* Update settings class to use the php filter_var function for boolean
Using the built-in filter type for boolean seems like a better option as they are faster, already hardened, and more widely tested.
I found this better method used originally by Mark J. Crane in 2022 in the content.php page so I included it here.
2025-03-04 11:25:47 -07:00
frytimo f8e1e81546 fix wrong logical check (#7282)
Forgot to remove the '!' (not) operator from the cache check when re-organizing the update cache function
2025-02-27 21:09:31 -07:00
frytimo 863de97270 Update grandstream template loop (#7281) 2025-02-27 19:47:27 -07:00
frytimo d919a3cc1b Add the apcu caching ability for performance (#7276)
* add the apcu caching ability for performance
When the PHP extension APCu is loaded, the settings class and the auto_loader will cache their results across requests in RAM. For more information about the APCu extension visit the PHP page: https://www.php.net/apcu

* use global instead of default terminology
2025-02-25 17:21:41 -07:00
frytimo fd34a000a6 Add old search method for auto loading classes (#7261)
Adding this commit to ensure backwards compatibility and a fail-safe mechanism for loading a class
2025-02-20 11:24:39 -07:00
frytimo 679b407562 bug fix domain name when using devices showall (#7259)
When the 'Show All' button is clicked the display of devices is using the current domain name instead of the domain name that belongs to the device
2025-02-18 15:01:19 -07:00
frytimo 5e6ec475df update auto_loader cache file when updating (#7255) 2025-02-15 10:44:46 -07:00
frytimo dc0f146485 fix php warning in menu class (#7256)
initialize variable before use
2025-02-15 10:43:03 -07:00
frytimo 0931197137 build array in auto_loader constructor (#7158)
* Build an array in the auto_loader constructor

* Update auto_loader.php

* Update auto_loader.php

* minor adjustment to name and comment and remove trailing closing tag

* use best practices for the loader method
Allowing the loader method:
- Should Never Be Called Manually
- Prevents External Modification
- Hides Implementation Details

* cache array in the temp folder and load if available

* re-organize functions within the class

* add cache recreation for auto_loader in upgrade_menu

* add cache recreation for auto_loader in upgrade_menu

* Update app_languages.php
2025-02-13 14:48:40 -07:00
frytimo 9b0eead911 Fix incorrect name on disk usage chart (#7237)
* fix incorrect name on disk usage chart

* put correct information in disk usage for Linux and FreeBSD systems

* Update system_disk_usage.php

* Update system_disk_usage.php
2025-02-13 14:18:36 -07:00
frytimo f03803f113 use settings object where possible (#7246)
* use settings object where possible

* use $user_uuid instead of $_SESSION['user_uuid']

* use extension_uuid when counting for performance
2025-02-13 14:12:48 -07:00
frytimo 056ddc93ca remove the automatic setting of server connection port in provisioning (#7243)
* remove the automatic setting of the server connection port in provisioning
2025-02-13 14:09:03 -07:00
frytimo 0cf387f306 do not save event_guard logs to transactions (#7254)
Event Guard already has a log table so no need to duplicate the transactions in another table
2025-02-13 09:10:33 -07:00
frytimo 0a5c377ae6 Remove Extra Line Ending (#7252) 2025-02-13 09:09:52 -07:00
frytimo 5c9eeb1956 Remove Extra Line Ending (#7253) 2025-02-13 09:09:34 -07:00
frytimo 1c29addf08 fix spelling mistake in xml_cdr function name (#7240) 2025-02-03 13:21:47 -07:00
frytimo d6f9b25283 format schema class (#7145)
- format schema class using autoformat
2025-01-28 17:05:00 -07:00
frytimo 3144036ae0 add new menu upgrade option to reset file permissions (#7232)
* add new menu upgrade option to reset file permissions
2025-01-28 16:20:43 -07:00
frytimo 7c887184ff adjust system service dashboard widget to not show by default (#7233) 2025-01-28 12:17:04 -07:00
frytimo 96da9967e0 create system services dashboard item (#7231)
* create system services dashboard item

* update internationalization language file used in system_services
2025-01-28 10:20:36 -07:00
frytimo da1da92d01 fix missing variable in default template (#7222)
When 'dev' or 'all' error level is set in the config.conf file, the menu will fail to expand or contract. This commit adds the missing variable causing a PHP warning responsible for the behavior.
2025-01-24 16:05:37 -07:00
frytimo d77b69b4d5 fix provision edit to use text type instead of numeric (#7229) 2025-01-24 10:15:36 -07:00
frytimo f6adc9bdd0 suppress access on null php notice in new is_connected method (#7227) 2025-01-23 12:38:03 -07:00
frytimo 95faf83337 add is_connected method to database (#7225) 2025-01-23 11:42:19 -07:00
frytimo 62039c300a fix menu php warning when restoring default menu (#7219) 2025-01-17 13:39:17 -07:00
frytimo 50125527de fix php warning for ini set (#7217)
The ini setting can only be modified when the session has not already started. This moves the ini_set function call inside the if block
2025-01-17 12:48:49 -07:00
frytimo dc22e87fc2 fix dashboard php warnings (#7218) 2025-01-17 12:48:11 -07:00
frytimo 24ecfa16a0 update voicemails to use settings object where possible (#7212) 2025-01-16 12:49:00 -07:00
frytimo 79b0767343 fix xml_cdr import failing to move a zero byte record to failed folder (#7210)
When an XML CDR record is zero bytes that is recorded in the /var/log/freeswitch/xml_cdr directory, the xml_cdr class would fail to move the file. This causes the record files to eventually build up to where the files can exceed the import limit. This adjustment moves the sanity checking for `filesize` to before the import attempt and checks for over limit and zero bytes. If those conditions match the file is moved to the "failed" folder.
2025-01-09 11:47:28 -07:00
frytimo 76af096f52 xml_cdr catch edge case of failed import when no start stamp is present (#7207)
* xml_cdr catch edge case of failed import when no start stamp is present

* xml_cdr catch edge case of failed import when no start stamp is present
2025-01-01 10:32:12 -07:00
frytimo 38b02f11d5 fix missing slash '/' at end of link tag (#7200) 2024-12-16 13:53:33 -07:00
frytimo 075cc4824a Security, Use the same number of characters for the masked password (#7198)
* security set display asterisks to constant number
Harder to guess when length is also hidden
2024-12-12 10:03:21 -07:00
frytimo 3d4fe6e5c1 fix call forward back button on save (#7196)
* fix call forward back button on save
2024-12-11 14:53:55 -07:00
frytimo bb76878156 fix voicemail message count when viewing all domains (#7186) 2024-11-30 12:10:58 -07:00
frytimo 58cfa404b7 fix voicemail message length and size display (#7185) 2024-11-30 11:40:52 -07:00
frytimo 91dcc94e82 Fix typo in filename (#7180) 2024-11-27 14:24:03 -07:00
frytimo 7133d4bff1 parse windows 1256 encoding type in email to fax (#7182) 2024-11-27 14:21:45 -07:00
frytimo b7afc086ec Update the menu class (#7181)
* fix php warnings in the menu class

* remove an unreachable statement

* update the menu_horizontal function to use settings

* use a single text object

* update menu_side_state to use the default value of contracted

* remove unused variable

* use variables for menu_side_state

* remove unused variable

* remove whitespace

* remove unused variable

* check for user UUID and domain UUID passed to the constructor

* update docs
2024-11-25 10:34:16 -07:00
frytimo 773ecc96cc pass database object to settings object (#7178)
Use the singleton database object with database::new syntax
Pass the connected database object to the settings object so settings object does not have to create another connection
2024-11-09 18:29:22 -07:00
frytimo f86214f61e Fix email send breaks transcribe when php 7.1 is used (#7170)
Ensured the values are of boolean type as PHP 7.1 treats them strange
2024-10-24 14:11:25 -06:00
frytimo 56f3135f21 Update template to match new boolean in settings (#7166) 2024-10-22 20:04:27 -06:00
frytimo 557de4b744 Update settings using real boolean (#7165)
* update settings using real boolean
2024-10-22 18:55:19 -06:00