Commit Graph

134 Commits

Author SHA1 Message Date
markjcrane
bf5bb4f642 Fix multiple PHP warnings 2025-11-01 19:58:21 -06:00
Mark J Crane
2d6fbf5741 Update the install.php
- Updated to work with latest changes
- Updated a few setting defaults
2025-10-19 20:57:34 -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
2fe8b65988 Define app_name and app_uuid as constants (#7534)
* Set a constant on each class for app_name and app_uuid
* Update the database class to use the app_uuid and app_name
* Update the classes to use the database::new()
* Remove the instances of 'new database'
2025-09-30 21:37:09 -06:00
FusionPBX
a690108fb1 Update the user profile URL and label 2025-09-23 15:05:11 -06:00
FusionPBX
2af950cfb3 Update the menu method restore name 2025-06-30 12:31:48 -06:00
FusionPBX
ee16644e25 Rename methods used in restore default
Renamed methods
- delete to restore_delete 
- restore to restore_default
2025-05-28 19:49:45 -06:00
FusionPBX
b96b5f8c0f menu_item_protected deprecated
This protected feature has not been working correctly. At the moment commented out depending on feedback it maybe removed entirely.
2025-05-28 19:37:58 -06:00
K-Flagman
62791e4eb3 [CORE] [MENU] Feature Assign/Unassign User Groups (#7373) 2025-05-17 13:50:02 -06:00
FusionPBX
0b9fd924a9 Add not empty check on the domains session 2025-03-29 13:20:38 -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
fusionate
7b3b3aa5f9 Menu: New option to set icon colors. 2025-03-03 14:08:05 -07:00
frytimo
dc0f146485 fix php warning in menu class (#7256)
initialize variable before use
2025-02-15 10:43:03 -07:00
fusionate
5b1697fc17 Menu - Fixed: Change to submenu item links to hopefully resolve random submenu closure on click bug. 2025-02-11 18:02:16 -07:00
frytimo
62039c300a fix menu php warning when restoring default menu (#7219) 2025-01-17 13:39:17 -07:00
fusionate
93309e17f9 Side Menu: Improved behavior for Expanded and Hidden states when clicking on the content body. 2025-01-15 13:56:02 -07:00
Alex
02aacd2c40 Fix menu_side_brand_image_contracted not showing (#7195) 2024-12-10 16:51:36 -07:00
Alex
f0bc1cfe33 Update contacts path (#7192)
* Update contacts path

* Update menu.php

* Update contact_edit.php

* Update contact_relation_edit.php

* Update config.php

* Update authentication.php

* Update database.php

* Update totp.php

* Update email.php
2024-12-06 11:55:41 -07:00
FusionPBX
cd8d5302ac Fix temporary permissions 2024-11-29 13:57:01 -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
fusionate
37ff548fa8 Side / Fixed Menu: Image placeholder tool tip. 2024-10-31 11:49:31 -06:00
fusionate
b766ad7f27 Side / Fixed Menu: Image placeholder for User Menu in Body Header / menu bar. 2024-10-31 11:37:17 -06:00
fusionate
b498af4cf4 Theme - Fixed Menu: Add new user menu to menu bar. 2024-10-07 14:36:55 -06:00
fusionate
ae15319487 Body Header User Image and Menu, Domain Selector, Contact Attachment improvements. 2024-09-28 16:37:36 -06:00
fusionate
b9ebdf673e Side Menu - Body Header: Show User's assigned primary Contact Attachment image, if exists. 2024-09-27 17:14:42 -06:00
fusionate
8e410a4b19 Theme - Side Menu: Better position submenu icons. 2024-09-09 18:47:42 -06:00
fusionate
6295dbe4fb Theme - Side Menu: Fix sub menu icons. 2024-09-09 17:02:45 -06:00
fusionate
d67bb02736 Theme - Side Menu: Scrub side menu pin. 2024-09-09 14:13:27 -06:00
fusionate
8f36cd3218 Theme - Side Menu: More adjustments. 2024-09-09 14:11:32 -06:00
fusionate
0d9400de54 Theme - Side Menu: More updates. 2024-09-09 13:51:23 -06:00
fusionate
b8689d8f57 Theme - Side Menu: More updates. 2024-09-09 13:22:44 -06:00
fusionate
259ac1212d Theme - Side Menu: More adjustments. 2024-09-09 12:36:16 -06:00
fusionate
f4fbb34e5f Theme - Side Menu: More adjustments. 2024-09-09 12:29:49 -06:00
fusionate
6059c1e7d1 Theme - Side Menu: Adjustments. 2024-09-09 10:53:12 -06:00
fusionate
d311dc14e9 Theme: Adjustment to make mobile side menu better. 2024-09-06 17:10:27 -06:00
fusionate
21be3354b1 Theme: Fix issue in last commit. 2024-09-04 20:00:49 -06:00
fusionate
65b957c2f7 Theme: Fix sub menu indicator icons, and date/time picker icons after Font Awesome upgrade. 2024-09-04 19:31:09 -06:00
fusionate
2eab5c623e Side Menu: Explicitly set content container width when side_menu_pin enabled to avoid issues with browser caching the css. 2024-09-04 13:49:44 -06:00
fusionate
4b23913555 Update Font Awesome to v6.6.x, adjust some icon references. 2024-08-09 18:14:52 -06:00
FusionPBX
a84c69a1dc Use the database object efficiently 2024-08-05 09:53:11 -06:00
fusionate
2d3dca985d Upgrade - CLI (Manual & Menu): Mitigate PHP 8.x warnings, minor adjustments. 2024-05-13 14:19:34 -06:00
fusionate
92e9c526d6 Menu [Class]: Minor adjustmemt to HTML output. 2023-10-18 13:13:39 +00:00
fusionate
dd1ba159ab Menu - Split longer submenus into two columns of items. 2023-10-17 00:27:59 +00:00
fusionate
1bc941e244 Menu [Class]: Reslove PHP 8.1 warning on mobile devices. 2023-07-11 20:26:38 +00:00
fusionate
8d51e9d948 Menu [Class]: Updates for PHP 8.1 2023-06-06 22:27:16 +00:00
markjcrane
c679165016 Menu: PHP 8.1 updates 2023-05-27 12:00:02 -06:00
fusionate
c42fd0abdc Menu [Class]: Updates for PHP 8.1 2023-05-17 20:36:14 +00:00
fusionate
8021a71647 Menu [Class]: Updates for PHP 8.1 2023-05-10 22:17:19 +00:00
FusionPBX
c57fa0fc39 Update for PHP 8.1 2023-05-09 18:39:24 -06:00
frytimo
fef8165be2 Frytimo pr patches for php8.1 (#6630)
* Passing null to parameter #2 ($string) of type string is deprecated

* Passing null to parameter #1 ($string) of type string is deprecated

* php 8.1 fixes

* php 8.1 fixes - replace strlen($var) > 0 with !empty($var)

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - replace ${var} with {$var}

* php 8.1 fixes - strlower with null

* php 8.1 fixes - strreplace with null

* php 8.1 fixes - passing null to base64_decode

* php 8.1 fixes - check for false and check for null on $this->dir

* php 8.1 fixes - remove assignment of $db variable to modules object

* php 8.1 fixes - avoid sending null to substr

* php 8.1 fixes - change ${var} to {$var}

* php 8.1 fixes - check for null before preg_replace

* php 8.1 fixes - remove setting db variable on domains object

* php 8.1 fixes - set empty string if $row['domain_setting_subcategory'] is null

* php 8.1 fixes - set empty string if $_REQUEST['show'] is not available

* php 8.1 fixes

* php 8.1 fixes - correct $_POST checking syntax

* php 8.1 fixes - correct $_POST variables

* php 8.1 fixes

* Use brackets consistently

* Update user_setting_edit.php

* Change to not empty

* Update device.php

* Update text.php

---------

Co-authored-by: Tim Fry <tim@voipstratus.com>
Co-authored-by: FusionPBX <markjcrane@gmail.com>
2023-05-05 10:46:37 -06:00