Commit Graph

279 Commits

Author SHA1 Message Date
markjcrane
97af53b810 Add a deprecated message to the check_str function 2025-11-01 21:06:23 -06:00
markjcrane
1c61513e90 Remove check_str function call
This function has been deprecated.
2025-11-01 20:55:23 -06:00
FusionPBX
940002ab64 Define global variables in multiple functions
Added global variable definitions to multiple functions for improved access to shared data.
2025-10-16 12:03:01 -06:00
FusionPBX
dda18481ec Refactor PHP code (#7574)
* Use settings-get method
- get default, domain and user settings
- Replace _SESSION

* Simplify get domain paging

* Change isset using empty

* Fix token name and hash

* Add new default settings category: contact, name: default_sort_column, and default_sort_order

* Update app_config.php

* Update footer.php

* Fix require.php and core/dashboard/index.php (#7563)

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Fix require.php and core/dashboard/index.php

* Update destinations.php

* Update permission.php

* Update require.php

---------

Co-authored-by: FusionPBX <markjcrane@gmail.com>
Co-authored-by: FusionPBX <mark@fusionpbx.com>

* Update header.php

* Use settings get classes (#7567)

* access_control

* azure

* azure

* basic_operator_panel

* bridges

* call_block

* call_broadcast

* call_center

* call_flows

* call_forward

* call_recordings

* do_not_disturb

* feature_event_notify

* follow_me

* remove unused object properties

* fix esl command

* fix esl command

* conference_centers

* conference_centers - remove whitespace

* conference_controls

* conference_profiles

* conference_profiles

* Delete core/websockets/resources/classes/socket_exception.php.original~

* Delete core/websockets/resources/classes/websocket_server.php.original~

* conferences

* destinations

* device

* dialplan

* email_queue

* event_guard

* extension_settings

* extension

* fax

* fax_queue

* fifo

* gateways

* ivr_menu

* modules

* switch_music_on_hold

* number_translations

* phrases

* pin_numbers

* provision

* switch_recordings

* registrations

* ring_groups

* sip_profiles

* sofia_global_settings

* streams

* presence

* switch_files

* time_conditions

* vars

* voicemail_greetings

* voicemail

* ringbacks

* contacts

* xml_cdr

* authentication

* dashboard

* default_settings

* domain_settings

* email_templates

* permission

* user_logs

* user_settings

* users

* button

* cache

* captcha

* remove cli_option

* remove directory.php for switch_directory class

* email

* file

* groups

* event_socket use config object

* Use intval to give an integer port

* switch_settings

* tones

* fix object used before initialization

* menu

* fix copy paste error for switch_files.php

* always include require.php for framework files

* Fix missing properties

* set the action

* Use the $database object

* Add missing class properties

* Fix the domain_name

* Use public scope for domain_uuid and domain_name

* Add missing parameters

* Correct the user_uuid parameter

* Add json_validate and use it in the dashboard
update indentation on functions.php

* Intialize the active_registrations variable

* Define the $parameters

* Set a default value for user_setting_enabled

* Add condition domain_uuid not empty

* Add not empty condition for domain_uuid

* Declare the global variables

* Update how the defaults are set use ??

* Use ?? to set the default values

* Update call_center_queue_edit.php

* Prevent an error

* Add domain_name property

* Fix the null coalescing operator

* Removed domain_uuid from the URL

* Change condition to check sip_profile_domain_name

* Refactor domain_uuid declaration and comments

Removed redundant domain_uuid declaration and updated comments.

* Account for an empty value

* Refactor constructor to use settings array

Updated constructor to accept settings array for domain UUID and database initialization.

* Refactor xml_cdr.php to improve variable organization

Removed duplicate domain_uuid declaration and reorganized private variables for better structure.

* Enhance transcription button logic and icon display

Updated transcription button visibility conditions and improved application icon handling in the call flow summary.

* Refactor settings initialization in domains.php

Updated settings initialization to include domain_uuid and user_uuid.

* Modify domain change condition in require.php

Updated condition to check if 'domain_change' is not empty before proceeding.

* Set default_setting_enabled to true by default

* Enhance domain UUID check in access controls

* Enhance domain UUID check in settings list

* Refactor category display logic in vars.php

* Simplify list row URL generation

Removed domain UUID check from list row URL construction.

* Refactor module category display logic

* Fix SQL query by removing parameters variable

* Initialize result_count variable for call recordings

* Refactor leg variable usage in xml_cdr_details.php

* Update conference_room_edit.php

* Change GET to REQUEST for order and search variables

* Set timezone and SQL time format in recordings.php

Added timezone and SQL time format settings.

* Set default for ring group greeting

* Improve domain UUID check in stream listing

* Handle null voicemail_option_param safely

* Add file existence check for greeting files

Check if greeting file exists before getting size and date.

* Improve domain UUID check in email templates

* Update FIFO strategy dropdown and description text

* Add multilingual agent descriptions

Added multilingual descriptions for agents in the app_languages.php file.

* Add music on hold descriptions

* Add the chime list description

Updated copyright year from 2024 to 2025.

* Fix domain UUID check and handle email subject decoding

* Add null coalescing for $value in email_test.php

Ensure $value is not null by providing a default empty string.

* Handle undefined dialplan_uuid in input field

* Add translations for 'Status' label in multiple languages

* Fix typo in config instance check

---------

Co-authored-by: frytimo <tim@fusionpbx.com>
2025-10-15 21:24:59 -06:00
FusionPBX
76e2e7d3b7 Remove database app_name and app_uuid (#7562)
- Remove database app_name, app_uuid
  - This is handled automatically by the database class
- Remove redundant database::new()
2025-10-09 17:54:05 -06:00
FusionPBX
5f35392871 Update functions.php 2025-08-04 15:42:08 -06:00
FusionPBX
d3123ec460 Update multiple git related functions 2025-06-26 06:28:16 -06:00
FusionPBX
57ffc57092 Update functions.php 2025-06-21 11:49:38 -06:00
FusionPBX
0b74f0bb26 Update functions.php 2025-04-17 14:14:03 -06:00
frytimo
e7393cc7c0 New Feature OpenID Connect (#7355)
* Refactor authentication to allow for OpenID Connect
The authentication class has been refactored to separate the `validate` function for the method `create_user_session`. This is needed for the OpenID Connect module to authenticate a user without going through the process of all authentication plugins. Only the function `check_user_cidr` has been rewritten to use a single loop instead of a double-loop.
Due to the fact that create_user_function is public, the $result associative array is checked to ensure the required fields are present and the UUID fields are valid UUIDs. Further checking could be done against the database to ensure the UUIDs exist but this has been suppressed at this time because database queries would be required.

* Database class modified to allow for login banners for OpenID Connect
The database class is responsible for creating the view for login. The OpenID application required banners to be present so that any OpenID Connect authentication mechanism could be used. Each banner displayed has the properties of: name, image, alt, and url. The name is the class name of the authentication plugin. This will match the action in the URL. The image is the image banner used for the login. The alt is the alternate text used for screen readers. Each authenticator is responsible for providing each of the field values.

* Added PHPDocs for the check_cidr function

* Add backwards compatibility for PHP versions below 8

* Remove get_banner_alt

* Update check_cidr to allow cidr array

* Update authentication.php

* Update functions.php

* Update authentication.php
2025-04-17 13:48:16 -06:00
FusionPBX
2ba87e5bee Add function escape_textarea 2025-04-11 12:06:52 -06:00
frytimo
bed7c8827f fix missing quotes on parameter default value (#7310) 2025-03-12 20:50:14 -06:00
FusionPBX
3f186d90cc Fix the forget password feature 2025-01-16 21:49:56 -07:00
FusionPBX
cd8d5302ac Fix temporary permissions 2024-11-29 13:57:01 -07:00
FusionPBX
77ec211020 Update functions.php
Remove closing PHP tag
2024-11-29 13:45:40 -07:00
FusionPBX
790d1ff137 Use the permissions::new method 2024-11-27 00:14:18 -07:00
FusionPBX
540efc355f Move the get_memory_details functions 2024-09-14 21:38:14 -06:00
FusionPBX
3b19f4a464 function permisison_exists remove operator
It was added by a contributor who hasn't used it anywhere in the project. For this reason its being removed.
2024-09-09 09:31:54 -06:00
FusionPBX
979917468c Use uuidgen on FreeBSD 2024-08-26 20:33:05 -06:00
frytimo
2cbb4dbc31 remove instances where a pointer is used in a foreach loop for value (#7108) 2024-08-22 12:41:10 -06:00
FusionPBX
e24edd47f0 Use database::new() 2024-08-05 09:58:14 -06:00
Antonio Fernandez
9ace83cad1 adding function to be used in app/messages (#7073) 2024-07-26 13:49:06 -06:00
FusionPBX
54e7b85142 Update functions.php 2024-06-28 13:10:15 -06:00
frytimo
0b8edef82c Config class rewrite (#6965)
* Use a singleton pattern in the database class to re-use the database object inside the permission_exists function.
2024-04-27 19:22:20 -06:00
frytimo
33ff85ee75 Commad line upgrade enhancements (#6955)
* 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
2024-04-22 17:15:09 -06:00
FusionPBX
675ac2d433 Prevents an error when groups session is not set 2024-04-20 17:06:05 -06:00
frytimo
a9886a8ba9 Add str_starts_with and str_ends_with to PHP versions older than 8 (#6832)
* Add str_starts_with and str_ends_with to PHP versions older than 8

* Update functions.php
2024-03-26 16:42:44 -06:00
fusionate
0be7204762 Functions: Mods to support color manipulations for waveform generation. 2024-02-09 13:05:38 -07:00
frytimo
a2c54d98b4 ensure $git_repo is an array and has elements before access (#6874) 2024-01-20 16:45:23 -07:00
FusionPBX
d428119f4f Fix natural_sort cast to text
If item being sorted is numeric data type need to cast to text.

This would usually be fixed during the upgrade. However BDR prevents using standard alter table data type commands.
2024-01-10 11:37:10 -07:00
fusionate
0e4f933da2 Functions: Minor clean up. 2023-12-22 00:09:26 +00:00
demonspork
df6d56d148 Support updating optional installed apps via git (#6513)
* WIP: Support updating optional installed apps via git

* support app source update via cli

* Update app_languages.php

* Update index.php

* Refactor App Git updating

Refactor Optional App Git updating for more resilience and better handling of ssh remotes and to only update each repository once.

* git app updates fix gui updates for repo based updating
2023-12-21 12:28:04 -07:00
FusionPBX
eee9006c1f Add format_seconds function 2023-12-14 17:01:32 -07:00
FusionPBX
40998fdac1 Fix color_adjust rgb error 2023-12-12 16:44:52 -07:00
frytimo
3a4c2f72e2 Event socket bug fix and more docs (#6823)
* 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
2023-12-02 17:16:18 -07:00
fusionate
4fcd98638b Order By [Function]: Only use natural sort function for PostgreSQL databases. 2023-10-19 18:45:42 +00:00
fusionate
0de8570dd3 Order By [Function]: Updated to support natural sorting. 2023-10-19 16:46:48 +00:00
fusionate
518c32efe6 Misc: Mitigate PHP 8.1 warnings. 2023-09-20 20:49:27 +00:00
fusionate
d9d17a6917 Misc: Remove parameters from event_socket_create() calls. 2023-09-20 18:43:17 +00:00
FusionPBX
5f688f2e1d Update functions.php 2023-09-11 11:43:31 -06:00
FusionPBX
2c5724c6ed Add new class methods and use them 2023-09-11 01:45:19 -06:00
fusionate
ac6d9e5c45 Functions - Adjust is_json() function for better detection. 2023-07-31 23:27:15 +00:00
FusionPBX
ee591e730e Use !empty function instead of != '' 2023-07-22 15:21:01 -06:00
fusionate
7dd146689f Functions: Update for PHP 8.1 2023-07-19 02:15:16 +00:00
FusionPBX
f998c4f62b Function format_hours convert seconds to an integer and use sprintf for leading zeros. 2023-07-06 15:40:53 -06:00
fusionate
212ceb361d Functions: Enhance is_uuid(), is_mac() and format_device_address() functions. 2023-06-30 21:47:32 +00:00
markjcrane
53779d50d3 Change device_mac_address to device_address 2023-06-29 23:40:11 -06:00
FusionPBX
4d54821119 Add a is_xml function 2023-06-16 11:13:20 -06:00
fusionate
09ba7069dc Functions: Enhance html_select_other() function. 2023-06-09 17:28:56 +00:00
fusionate
c8e8c5acd7 Functions: Update format_phone() function for PHP 8.1 2023-06-01 23:22:39 +00:00