Using isset on the key name of the array allows it to use a hash table lookup to improve the lookup times for a permission. The permission name is not set if it does not exist for the current user.
* pass objects to authentication plugins when possible
Pass the settings and authentication objects to the plugins to re-use existing objects
* Update authentication.php
Logging after all checks are complete ensures the session ID is correct when logging it in the user_logs table
Co-authored-by: Tim Fry <tim@fusionpbx.com>
Updates:
- use config object to find and load config file
- use single database object with config passed in constructor
- use settings object with database passed in constructor
- parse command line options with for loop so order no longer matters
- store all passed options in the super global $_REQUEST array for easy reference and debugging
- add debug and debug_level options for command line
- allow dumping the command line arguments when debug_level is 3 or higher
- add config option in command line to set location of config file
- add a shutdown function to allow for the exit command to be used but still output to either console or file
- add extra checks for options that are needed during runtime
- remove old PHP version 4 code
- add is_file check when checking for a valid .tiff file because file_exists returns true if it's a directory or file
* move permissions to top of page and use single database object
* use a domain array instead of session
* use a domain array instead of session
* add multiple line export feature
Exporting devices with multiple lines did not show headers for extra columns if the first device listed only had a single line and the other devices had multiple lines. This adds a feature to export multiple lines for devices using the "duplicate column feature" so that the import feature can detect and import all lines for the device.
* Update device_download.php
It was found that the domain_filter was not working when provisioning devices. This can lead to conflicts if a device address is in multiple domains or a valid device address is sent for another domain. This enforces the check so that if http_domain_filter is enabled and the domain name does not match the device specified, it will reject the request.
* Remove the unset($database) statements
The database object is a global variable that contains a database object reference and should not be unset.
* Update event_guard.php
* Update event_guard.php
* Update event_guard.php
---------
Co-authored-by: Tim Fry <tim@fusionpbx.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
If the settings object is not passed in the parameters the settings object that was created did not have the current domain uuid or user uuid set. This would cause default settings that were copied to the domain to be ignored. Ensuring the domain_uuid and user_uuid are initialized before the setting object and then passing them to the settings object constructor will make sure that the values would be returned when a request to the settings object is made.
The method overwrites the object property initially set when the method is called. This causes any subsequent calls to be incorrect. Removing this keeps the initial objects property intact. The method voicemail_messages is only used internally from the messages method for getting message details in the voicemails. This has been set to a private method to reflect this type of use.
Authored-by: Tim Fry <tim@fusionpbx.com>
When voicemail is called the first time, it correctly displays the list of voicemail messages. When it is called a second time the function returns an empty array and gives an empty display. This removes the second call to method 'messages' in 'voicemail' object.
authored-by: Tim Fry <tim@fusionpbx.com>
When using session_path, the session must be active and will automatically activate the session. This is a better method so that the session is never started.
Co-authored-by: Tim Fry <tim@fusionpbx.com>
Update comparison checks when testing the database status and
add a unified log message with a more detailed message from the
database when there is a failure
Authored-by: Tim Fry <tim@fusionpbx.com>
Class name requires the transcribe_ prepended before PHP checks to see
if the class actually exists as the engine must have 'transcribe_' in
front of the classes.
Co-authored-by: Tim Fry <tim@fusionpbx.com>
* add database_maintenance function to database_transactions
* update database_maintenance function in database_transactions
New changes in the maintenance application required changes to any
existing functions already created
---------
Co-authored-by: Tim Fry <tim@fusionpbx.com>
* update xml_cdr with the latest changes to the maintenance application
Update the public static function database_maintenance in xml_cdr
class to use the newest changes in the maintenance class. Constants are
now defined in the class for the table names and subcategories.
* update app_config file with necessary default setting changes
* remove constants
* use empty instead of null check
---------
Co-authored-by: Tim Fry <tim@fusionpbx.com>
* add filesystem maintenance method to the call_recordings class
* Add filesystem maintenance default setting to the app_config
Set filesystem_retention_days default setting to 90 days in the
app_config.php file to allow the maintenance service to delete older
files.
* update voicemail with the latest changes to the maintenance application
Update the public static function filesystem_maintenance in voicemail
class to use the newest changes in the maintenance class. The
maintenance class now has a constant defined for the subcategory used
within the project.
* update app_config file with necessary default setting changes
---------
Authored-by: Tim Fry <tim@fusionpbx.com>
By including the class manually with the include statement, the class
has a possibility of loading twice. This will cause a fatal error if
classes are already loaded.
This uses the settings default value to set smtp_from_name to be set to
smtp_from if it does not have it's own value. The isset check on line
248 is no longer needed because smtp_from_name will always have a value
* Add new English language phrases for cli upgrade menu
* include a software name as a const for cli upgrade menu
* add it repos in app folder, internationalizations, and descriptions
* bug fix when response_source_update is empty change back to origin dir
* change original 'menu' to 'menus'. Allow calling menu from upgrade.php
* Update upgrade_menu.php
* allow settings to load domain and user settings
* ensure the engine is also enabled before attempting to create a new object
* add default values to stop undefined variable warnings
* enforce all models to set and return voices and languages
* enforce all models to set and return languages
* ensure speech_enabled is set by the current session
* create elevenlabs implementation of ai speech
* Update ai_elevenlabs.php
* allow settings to load domain and user settings
* ensure engine is also enabled before attempting to create a new object
* add default values to stop undefined variable warnings
* enforce all models to set and return voices and languages
* enforce all models to set and return languages
* ensure speech_enabled is set by the current session
* initial commit for system information bug report data
* add javascript to copy to clipboard
* add javascript to copy to clipboard
* Update copy_to_clipboard.js
* Update system.php
* Update app_languages.php
Add other languages
* move function file to resources/functions directory
* use the array returned from system_information function
* Update app_languages.php
* update path locations
* remove require files
* Merge origin/create_json_page_for_bug_report into create_json_page_for_bug_report
* Add documentation to methods. Use is_resource for added type detection
* Allow connect to specify timeout in microseconds with default 30,000
* Update calling mechanism for event sockets
* Update project for new singleton event sockets
* remove unused variable
* catch errors on closing the socket
* logging class improvements
* remove alias
* adjust line print out for field order
* refactor class name to be inline with framework standard
* fix writing direct to write method
* reorder the project_root and project_path define so isset is called
before the config key project.root is used
* ensure project path begins with a '/'
* rewrite for empty string in project_path
* Update require.php
* fix multiple warnings
* fix multiple warnings
* ensure array key exists
* ensure array key exists
* assign boolean variable for showall in url
* change boolean to show_all instead of showall
* revert some changes. Create default leg value and mos_score
* validate page integer
* revert back to showall from get