From ccb4b2a5bf6e15dbc1f7648564697e21dd648661 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 26 Aug 2025 13:02:14 -0600 Subject: [PATCH] Use the settings class get method --- app/basic_operator_panel/resources/content.php | 4 ++-- app/call_forward/call_forward_edit.php | 4 ++-- .../resources/classes/call_forward.php | 2 +- .../resources/classes/do_not_disturb.php | 2 +- .../resources/classes/follow_me.php | 2 +- .../conferences_active_inc.php | 6 ++++-- app/destinations/destination_imports.php | 2 +- app/devices/device_profiles.php | 4 ++-- app/devices/device_vendor_functions.php | 4 ++-- app/devices/device_vendors.php | 4 ++-- app/email_queue/email_queue.php | 4 ++-- app/event_guard/event_guard_logs.php | 4 ++-- app/extensions/extensions.php | 4 ++-- app/fax/fax.php | 4 ++-- app/fax/fax_logs.php | 4 ++-- app/phrases/phrases.php | 4 ++-- app/pin_numbers/pin_numbers.php | 4 ++-- app/registrations/registrations.php | 6 +++--- app/ring_groups/ring_groups.php | 4 ++-- app/streams/streams.php | 4 ++-- app/time_conditions/time_conditions.php | 4 ++-- app/voicemail_greetings/voicemail_greetings.php | 4 ++-- app/xml_cdr/xml_cdr_inc.php | 17 +++++++++-------- core/contacts/contact_edit.php | 4 ++-- core/contacts/contact_phones.php | 4 ++-- core/contacts/contact_urls.php | 4 ++-- core/dashboard/dashboard.php | 4 ++-- core/users/user_edit.php | 10 +++++----- resources/footer.php | 7 +++---- resources/php.php | 2 +- 30 files changed, 69 insertions(+), 67 deletions(-) diff --git a/app/basic_operator_panel/resources/content.php b/app/basic_operator_panel/resources/content.php index c39437601a..2331f92afb 100644 --- a/app/basic_operator_panel/resources/content.php +++ b/app/basic_operator_panel/resources/content.php @@ -353,7 +353,7 @@ if (is_array($activity)) { } else { //unregistered extension - if (filter_var($_SESSION['operator_panel']['show_unregistered']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) { + if ($settings->get('operator_panel', 'show_unregistered', false)) { $css_class = "ur_ext"; } else { @@ -551,7 +551,7 @@ if (is_array($activity)) { if (in_array($extension, $_SESSION['user']['extensions'])) { $user_extensions[] = $block; - } elseif (!empty($ext['call_group']) && filter_var($_SESSION['operator_panel']['group_extensions']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) { + } elseif (!empty($ext['call_group']) && $settings->get('operator_panel', 'group_extensions', false)) { $grouped_extensions[$ext['call_group']][] = $block; } else { $other_extensions[] = $block; diff --git a/app/call_forward/call_forward_edit.php b/app/call_forward/call_forward_edit.php index 12776399d5..12899683f3 100644 --- a/app/call_forward/call_forward_edit.php +++ b/app/call_forward/call_forward_edit.php @@ -341,7 +341,7 @@ */ //send feature event notify to the phone - if (filter_var($_SESSION['device']['feature_sync']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) { + if ($settings->get('device', 'feature_sync', false)) { $ring_count = ceil($call_timeout / 6); $feature_event_notify = new feature_event_notify; $feature_event_notify->domain_name = $_SESSION['domain_name']; @@ -503,7 +503,7 @@ } //prepare the autocomplete - if(filter_var($_SESSION['follow_me']['follow_me_autocomplete']['boolean'] ?? false, FILTER_VALIDATE_BOOLEAN)) { + if ($settings->get('follow_me', 'follow_me_autocomplete', false)) { echo "\n"; echo "\n"; echo "