From 8d5572a943f4612d327d1964669a1e92a290a7d6 Mon Sep 17 00:00:00 2001 From: Mark J Crane Date: Wed, 22 Oct 2025 10:04:34 -0600 Subject: [PATCH] If search is not set use an empty string instead of null --- app/access_controls/access_controls.php | 4 ++-- app/bridges/bridges.php | 4 ++-- app/call_block/call_block.php | 4 ++-- app/call_broadcast/call_broadcast.php | 4 ++-- app/call_centers/call_center_agents.php | 4 ++-- app/call_centers/call_center_queues.php | 4 ++-- app/call_flows/call_flows.php | 4 ++-- app/call_recordings/call_recordings.php | 4 ++-- app/conference_centers/conference_centers.php | 4 ++-- app/conference_centers/conference_rooms.php | 4 ++-- app/conference_controls/conference_controls.php | 4 ++-- app/conference_profiles/conference_profiles.php | 4 ++-- app/conferences/conferences.php | 4 ++-- app/destinations/destinations.php | 2 +- app/devices/device_profiles.php | 2 +- app/devices/device_vendors.php | 4 ++-- app/dialplans/dialplans.php | 2 +- app/email_queue/email_queue.php | 4 ++-- app/emergency/emergency.php | 4 ++-- app/event_guard/event_guard_logs.php | 4 ++-- app/extension_settings/extension_settings.php | 4 ++-- app/extensions/extensions.php | 4 ++-- app/fax/fax.php | 4 ++-- app/fifo/fifo.php | 4 ++-- app/gateways/gateways.php | 2 +- app/ivr_menus/ivr_menus.php | 4 ++-- app/modules/modules.php | 4 ++-- app/number_translations/number_translations.php | 4 ++-- app/phrases/phrases.php | 4 ++-- app/pin_numbers/pin_numbers.php | 4 ++-- app/recordings/recordings.php | 2 +- app/registrations/registrations.php | 2 +- app/ring_groups/ring_groups.php | 4 ++-- app/sip_profiles/sip_profiles.php | 4 ++-- app/sofia_global_settings/sofia_global_settings.php | 4 ++-- app/streams/streams.php | 4 ++-- app/time_conditions/time_conditions.php | 4 ++-- app/vars/vars.php | 2 +- app/voicemails/voicemails.php | 2 +- core/contacts/contacts.php | 4 ++-- core/dashboard/dashboard.php | 4 ++-- core/default_settings/default_setting_edit.php | 2 +- core/default_settings/default_setting_toggle.php | 2 +- core/default_settings/default_settings.php | 2 +- core/domains/domain_json.php | 2 +- core/domains/domains.php | 2 +- core/email_templates/email_templates.php | 4 ++-- core/groups/group_permissions.php | 8 ++++---- core/groups/groups.php | 2 +- core/menu/menu.php | 2 +- core/user_logs/user_logs.php | 4 ++-- core/users/users.php | 2 +- 52 files changed, 90 insertions(+), 90 deletions(-) diff --git a/app/access_controls/access_controls.php b/app/access_controls/access_controls.php index feadcdc5ad..ff391c5604 100644 --- a/app/access_controls/access_controls.php +++ b/app/access_controls/access_controls.php @@ -96,7 +96,7 @@ } //redirect the user - header('Location: access_controls.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: access_controls.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } @@ -152,7 +152,7 @@ echo "
\n"; echo "
".$text['title-access_controls']."
".number_format($num_rows)."
\n"; echo "
\n"; - echo button::create(['label'=>$text['button-reload'],'icon'=>$settings->get('theme', 'button_icon_reload'),'type'=>'button','id'=>'button_reload','link'=>'access_controls_reload.php'.(!empty($search) ? '?search='.urlencode($search) : null),'style'=>'margin-right: 15px;']); + echo button::create(['label'=>$text['button-reload'],'icon'=>$settings->get('theme', 'button_icon_reload'),'type'=>'button','id'=>'button_reload','link'=>'access_controls_reload.php'.(!empty($search) ? '?search='.urlencode($search) : ''),'style'=>'margin-right: 15px;']); if (permission_exists('access_control_add')) { echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add'),'id'=>'btn_add','name'=>'btn_add','link'=>'access_control_edit.php']); } diff --git a/app/bridges/bridges.php b/app/bridges/bridges.php index 2f8c703d6a..482d7366e4 100644 --- a/app/bridges/bridges.php +++ b/app/bridges/bridges.php @@ -52,7 +52,7 @@ //get the http post data if (!empty($_POST['bridges'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $bridges = $_POST['bridges']; } @@ -79,7 +79,7 @@ break; } - header('Location: bridges.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: bridges.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php index 45adfee875..418516a320 100644 --- a/app/call_block/call_block.php +++ b/app/call_block/call_block.php @@ -51,7 +51,7 @@ //get posted data if (!empty($_POST['call_blocks'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $call_blocks = $_POST['call_blocks']; } @@ -78,7 +78,7 @@ break; } - header('Location: call_block.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: call_block.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/call_broadcast/call_broadcast.php b/app/call_broadcast/call_broadcast.php index 4842180a08..b79529b692 100644 --- a/app/call_broadcast/call_broadcast.php +++ b/app/call_broadcast/call_broadcast.php @@ -52,7 +52,7 @@ //get posted data if (!empty($_POST['call_broadcasts'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $call_broadcasts = $_POST['call_broadcasts']; } @@ -73,7 +73,7 @@ break; } - header('Location: call_broadcast.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: call_broadcast.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/call_centers/call_center_agents.php b/app/call_centers/call_center_agents.php index ec536694e2..5c9b73bd1a 100644 --- a/app/call_centers/call_center_agents.php +++ b/app/call_centers/call_center_agents.php @@ -48,7 +48,7 @@ //get posted data if (!empty($_POST['call_center_agents'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $call_center_agents = $_POST['call_center_agents']; } @@ -63,7 +63,7 @@ break; } - header('Location: call_center_agents.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: call_center_agents.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/call_centers/call_center_queues.php b/app/call_centers/call_center_queues.php index b3d19fe446..f5a6525b01 100644 --- a/app/call_centers/call_center_queues.php +++ b/app/call_centers/call_center_queues.php @@ -51,7 +51,7 @@ //get posted data if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $call_center_queues = $_POST['call_center_queues']; } @@ -72,7 +72,7 @@ break; } - header('Location: call_center_queues.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: call_center_queues.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/call_flows/call_flows.php b/app/call_flows/call_flows.php index eb43308464..9e6b25cbfb 100644 --- a/app/call_flows/call_flows.php +++ b/app/call_flows/call_flows.php @@ -49,7 +49,7 @@ $list_row_edit_button = $settings->get('theme', 'list_row_edit_button', false); //get search - $search = $_REQUEST['search'] ?? null; + $search = $_REQUEST['search'] ?? ''; //get posted data if (!empty($_POST['call_flows'])) { @@ -82,7 +82,7 @@ break; } - header('Location: call_flows.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: call_flows.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/call_recordings/call_recordings.php b/app/call_recordings/call_recordings.php index 432fd28904..72d9b1341e 100644 --- a/app/call_recordings/call_recordings.php +++ b/app/call_recordings/call_recordings.php @@ -55,7 +55,7 @@ //get the http post data if (!empty($_POST['call_recordings']) && is_array($_POST['call_recordings'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $call_recordings = $_POST['call_recordings']; } @@ -83,7 +83,7 @@ } //redirect the user - header('Location: call_recordings.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: call_recordings.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/conference_centers/conference_centers.php b/app/conference_centers/conference_centers.php index 8287521693..4e5760368d 100644 --- a/app/conference_centers/conference_centers.php +++ b/app/conference_centers/conference_centers.php @@ -51,7 +51,7 @@ //get posted data if (!empty($_POST['conference_centers'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $conference_centers = $_POST['conference_centers']; } @@ -80,7 +80,7 @@ break; } - header('Location: conference_centers.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: conference_centers.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/conference_centers/conference_rooms.php b/app/conference_centers/conference_rooms.php index b1af9859d6..1636d31033 100644 --- a/app/conference_centers/conference_rooms.php +++ b/app/conference_centers/conference_rooms.php @@ -52,7 +52,7 @@ if (!empty($_POST['conference_rooms'])) { $action = $_POST['action']; $toggle_field = $_POST['toggle_field']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $conference_rooms = $_POST['conference_rooms']; } @@ -74,7 +74,7 @@ break; } - header('Location: conference_rooms.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: conference_rooms.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/conference_controls/conference_controls.php b/app/conference_controls/conference_controls.php index 4a6add57c6..5afb27bc2d 100644 --- a/app/conference_controls/conference_controls.php +++ b/app/conference_controls/conference_controls.php @@ -48,7 +48,7 @@ //get the http post data if (!empty($_POST['conference_controls'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $conference_controls = $_POST['conference_controls']; } @@ -75,7 +75,7 @@ break; } - header('Location: conference_controls.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: conference_controls.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/conference_profiles/conference_profiles.php b/app/conference_profiles/conference_profiles.php index bd7eb83509..b51b1997fe 100644 --- a/app/conference_profiles/conference_profiles.php +++ b/app/conference_profiles/conference_profiles.php @@ -50,7 +50,7 @@ //get the http post data if (!empty($_POST['conference_profiles'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $conference_profiles = $_POST['conference_profiles']; } @@ -77,7 +77,7 @@ break; } - header('Location: conference_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: conference_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/conferences/conferences.php b/app/conferences/conferences.php index 40e0369508..69549b2080 100644 --- a/app/conferences/conferences.php +++ b/app/conferences/conferences.php @@ -51,7 +51,7 @@ //get posted data if (!empty($_POST['conferences'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $conferences = $_POST['conferences']; } @@ -78,7 +78,7 @@ break; } - header('Location: conferences.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: conferences.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index 2d8916b64e..35e093d17d 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -79,7 +79,7 @@ break; } - header('Location: destinations.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: destinations.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/devices/device_profiles.php b/app/devices/device_profiles.php index 319f26bd7e..6274c0afc9 100644 --- a/app/devices/device_profiles.php +++ b/app/devices/device_profiles.php @@ -44,7 +44,7 @@ //get posted data if (!empty($_POST['profiles']) && is_array($_POST['profiles'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $profiles = $_POST['profiles']; } diff --git a/app/devices/device_vendors.php b/app/devices/device_vendors.php index 84c67a0e5f..3bb5f0a12b 100644 --- a/app/devices/device_vendors.php +++ b/app/devices/device_vendors.php @@ -45,7 +45,7 @@ //get posted data if (!empty($_POST['vendors']) && is_array($_POST['vendors'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $vendors = $_POST['vendors']; } @@ -66,7 +66,7 @@ break; } - header('Location: device_vendors.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: device_vendors.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/dialplans/dialplans.php b/app/dialplans/dialplans.php index 324122d451..2ac3c4a626 100644 --- a/app/dialplans/dialplans.php +++ b/app/dialplans/dialplans.php @@ -60,7 +60,7 @@ $action = $_POST['action']; $dialplans = $_POST['dialplans']; $context = $_POST['context']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $order_by = $_POST['order_by']; $order = $_POST['order']; } diff --git a/app/email_queue/email_queue.php b/app/email_queue/email_queue.php index ef801f3335..caa3393e6b 100644 --- a/app/email_queue/email_queue.php +++ b/app/email_queue/email_queue.php @@ -45,7 +45,7 @@ //get the http post data if (!empty($_POST['email_queue']) && is_array($_POST['email_queue'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $email_queue = $_POST['email_queue']; } @@ -90,7 +90,7 @@ } //redirect the user - header('Location: email_queue.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: email_queue.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/emergency/emergency.php b/app/emergency/emergency.php index 9c29a82642..670a66a01a 100644 --- a/app/emergency/emergency.php +++ b/app/emergency/emergency.php @@ -21,7 +21,7 @@ $text = $language->get(); //get the http post data if (!empty($_POST['emergency_logs']) && is_array($_POST['emergency_logs'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $emergency_logs = $_POST['emergency_logs']; } @@ -59,7 +59,7 @@ if (!empty($action) && !empty($emergency_logs) && is_array($emergency_logs) && @ } //redirect the user - header('Location: emergency.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: emergency.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/event_guard/event_guard_logs.php b/app/event_guard/event_guard_logs.php index e3db39e08f..69c2d81979 100644 --- a/app/event_guard/event_guard_logs.php +++ b/app/event_guard/event_guard_logs.php @@ -44,7 +44,7 @@ //get the http post data if (!empty($_POST['event_guard_logs']) && is_array($_POST['event_guard_logs'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $event_guard_logs = $_POST['event_guard_logs']; } @@ -73,7 +73,7 @@ } //redirect the user - header('Location: event_guard_logs.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: event_guard_logs.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/extension_settings/extension_settings.php b/app/extension_settings/extension_settings.php index 0c8361e3ea..af79e29322 100644 --- a/app/extension_settings/extension_settings.php +++ b/app/extension_settings/extension_settings.php @@ -49,7 +49,7 @@ //get the http post data if (!empty($_POST['extension_settings'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $extension_settings = $_POST['extension_settings']; } @@ -93,7 +93,7 @@ } //redirect the user - header('Location: extension_settings.php?id='.urlencode($extension_uuid).'&'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: extension_settings.php?id='.urlencode($extension_uuid).'&'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/extensions/extensions.php b/app/extensions/extensions.php index f7de4caff0..f5e36269b6 100644 --- a/app/extensions/extensions.php +++ b/app/extensions/extensions.php @@ -52,7 +52,7 @@ //get posted data if (!empty($_POST['extensions']) && is_array($_POST['extensions'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $extensions = $_POST['extensions']; } @@ -77,7 +77,7 @@ break; } - header('Location: extensions.php?'.(!empty($order_by) ? '&order_by='.$order_by.'&order='.$order : null).(is_numeric($page) ? '&page='.urlencode($page) : null).($search != '' ? '&search='.urlencode($search) : null)); + header('Location: extensions.php?'.(!empty($order_by) ? '&order_by='.$order_by.'&order='.$order : null).(is_numeric($page) ? '&page='.urlencode($page) : null).($search != '' ? '&search='.urlencode($search) : '')); exit; } diff --git a/app/fax/fax.php b/app/fax/fax.php index 73e747f566..932bb071f0 100644 --- a/app/fax/fax.php +++ b/app/fax/fax.php @@ -45,7 +45,7 @@ //get posted data if (!empty($_POST['fax_servers']) && is_array($_POST['fax_servers'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $fax_servers = $_POST['fax_servers']; } @@ -66,7 +66,7 @@ break; } - header('Location: fax.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: fax.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/fifo/fifo.php b/app/fifo/fifo.php index a55f46b6c2..8a1cfabb8d 100644 --- a/app/fifo/fifo.php +++ b/app/fifo/fifo.php @@ -48,7 +48,7 @@ //get the http post data if (!empty($_POST['fifo']) && is_array($_POST['fifo'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $fifo = $_POST['fifo']; } @@ -86,7 +86,7 @@ } //redirect the user - header('Location: fifo.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: fifo.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/gateways/gateways.php b/app/gateways/gateways.php index a71d3aee72..56466766f6 100644 --- a/app/gateways/gateways.php +++ b/app/gateways/gateways.php @@ -85,7 +85,7 @@ break; } - header('Location: gateways.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: gateways.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/ivr_menus/ivr_menus.php b/app/ivr_menus/ivr_menus.php index b748cfffd7..539992c118 100644 --- a/app/ivr_menus/ivr_menus.php +++ b/app/ivr_menus/ivr_menus.php @@ -50,7 +50,7 @@ //get posted data if (!empty($_POST['ivr_menus'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $ivr_menus = $_POST['ivr_menus']; } @@ -77,7 +77,7 @@ break; } - header('Location: ivr_menus.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: ivr_menus.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/modules/modules.php b/app/modules/modules.php index 5812d20802..f29d760cdb 100644 --- a/app/modules/modules.php +++ b/app/modules/modules.php @@ -56,7 +56,7 @@ $action = $_POST['action']; } if (!empty($_POST['search'])) { - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; } //set from session variables @@ -93,7 +93,7 @@ } //redirect to display updates - header('Location: modules.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: modules.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/number_translations/number_translations.php b/app/number_translations/number_translations.php index b400108878..7e4f5fa842 100644 --- a/app/number_translations/number_translations.php +++ b/app/number_translations/number_translations.php @@ -51,7 +51,7 @@ //get the http post data if (!empty($_POST['number_translations'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $number_translations = $_POST['number_translations']; } @@ -95,7 +95,7 @@ } //redirect the user - header('Location: number_translations.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: number_translations.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/phrases/phrases.php b/app/phrases/phrases.php index 375cc95deb..34786d66bc 100644 --- a/app/phrases/phrases.php +++ b/app/phrases/phrases.php @@ -48,7 +48,7 @@ //get posted data if (!empty($_POST['phrases'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $phrases = $_POST['phrases']; } @@ -78,7 +78,7 @@ break; } - header('Location: phrases.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: phrases.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/pin_numbers/pin_numbers.php b/app/pin_numbers/pin_numbers.php index d17daa5bd6..eab968178b 100644 --- a/app/pin_numbers/pin_numbers.php +++ b/app/pin_numbers/pin_numbers.php @@ -45,7 +45,7 @@ //get posted data if (is_array($_POST['pin_numbers'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $pin_numbers = $_POST['pin_numbers']; } @@ -72,7 +72,7 @@ break; } - header('Location: pin_numbers.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: pin_numbers.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php index 3c61ed017d..4f20cc8bf6 100644 --- a/app/recordings/recordings.php +++ b/app/recordings/recordings.php @@ -295,7 +295,7 @@ break; } - header('Location: recordings.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: recordings.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/registrations/registrations.php b/app/registrations/registrations.php index def116880f..804f37d93d 100644 --- a/app/registrations/registrations.php +++ b/app/registrations/registrations.php @@ -45,7 +45,7 @@ //get common submitted data if (!empty($_REQUEST)) { $show = $_REQUEST['show'] ?? null; - $search = $_REQUEST['search'] ?? null; + $search = $_REQUEST['search'] ?? ''; $profile = $_REQUEST['profile'] ?? null; } diff --git a/app/ring_groups/ring_groups.php b/app/ring_groups/ring_groups.php index 22b935dbcc..adb85dcd43 100644 --- a/app/ring_groups/ring_groups.php +++ b/app/ring_groups/ring_groups.php @@ -52,7 +52,7 @@ //get posted data if (!empty($_POST['ring_groups'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $ring_groups = $_POST['ring_groups']; } @@ -73,7 +73,7 @@ break; } - header('Location: ring_groups.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: ring_groups.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/sip_profiles/sip_profiles.php b/app/sip_profiles/sip_profiles.php index e21d63b9b4..cc70dc33e4 100644 --- a/app/sip_profiles/sip_profiles.php +++ b/app/sip_profiles/sip_profiles.php @@ -50,7 +50,7 @@ //get the http post data if (!empty($_POST['sip_profiles'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $sip_profiles = $_POST['sip_profiles']; } @@ -71,7 +71,7 @@ break; } - header('Location: sip_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: sip_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/sofia_global_settings/sofia_global_settings.php b/app/sofia_global_settings/sofia_global_settings.php index 8ca302929a..6ee351a7cb 100644 --- a/app/sofia_global_settings/sofia_global_settings.php +++ b/app/sofia_global_settings/sofia_global_settings.php @@ -49,7 +49,7 @@ //get the http post data if (!empty($_POST['sofia_global_settings'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $sofia_global_settings = $_POST['sofia_global_settings']; } @@ -78,7 +78,7 @@ } //redirect the user - header('Location: sofia_global_settings.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: sofia_global_settings.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/streams/streams.php b/app/streams/streams.php index 813c25bd46..f07ac7c751 100644 --- a/app/streams/streams.php +++ b/app/streams/streams.php @@ -48,7 +48,7 @@ //get the http post data if (!empty($_POST['streams'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $streams = $_POST['streams']; } @@ -75,7 +75,7 @@ break; } - header('Location: streams.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: streams.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/time_conditions/time_conditions.php b/app/time_conditions/time_conditions.php index a239b1469a..982119d6dc 100644 --- a/app/time_conditions/time_conditions.php +++ b/app/time_conditions/time_conditions.php @@ -45,7 +45,7 @@ //get the http post data if (!empty($_POST['time_conditions']) && is_array($_POST['time_conditions'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $time_conditions = $_POST['time_conditions']; } @@ -72,7 +72,7 @@ break; } - header('Location: time_conditions.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: time_conditions.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/vars/vars.php b/app/vars/vars.php index e7506894a4..11bf09091b 100644 --- a/app/vars/vars.php +++ b/app/vars/vars.php @@ -76,7 +76,7 @@ break; } - header('Location: vars.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: vars.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/app/voicemails/voicemails.php b/app/voicemails/voicemails.php index c672279793..0776f37e41 100644 --- a/app/voicemails/voicemails.php +++ b/app/voicemails/voicemails.php @@ -70,7 +70,7 @@ break; } - header('Location: voicemails.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: voicemails.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/core/contacts/contacts.php b/core/contacts/contacts.php index 8bb2e485bc..574b277560 100644 --- a/core/contacts/contacts.php +++ b/core/contacts/contacts.php @@ -51,7 +51,7 @@ //get posted data if (!empty($_POST['contacts'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $contacts = $_POST['contacts']; } @@ -66,7 +66,7 @@ break; } - header('Location: contacts.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: contacts.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/core/dashboard/dashboard.php b/core/dashboard/dashboard.php index f52d1d8b17..053f182fb3 100644 --- a/core/dashboard/dashboard.php +++ b/core/dashboard/dashboard.php @@ -45,7 +45,7 @@ //get the http post data if (!empty($_POST['dashboards'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $dashboards = $_POST['dashboards']; } @@ -73,7 +73,7 @@ } //redirect the user - header('Location: dashboard.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: dashboard.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/core/default_settings/default_setting_edit.php b/core/default_settings/default_setting_edit.php index d6aad054c0..f68b63ab52 100644 --- a/core/default_settings/default_setting_edit.php +++ b/core/default_settings/default_setting_edit.php @@ -62,7 +62,7 @@ //get the search variable if (!empty($_REQUEST['search'])) { - $search = $_REQUEST['search']; + $search = $_REQUEST['search'] ?? ''; } //get http post variables and set them to php variables diff --git a/core/default_settings/default_setting_toggle.php b/core/default_settings/default_setting_toggle.php index 9dbc71bb7e..287d7a8ecf 100644 --- a/core/default_settings/default_setting_toggle.php +++ b/core/default_settings/default_setting_toggle.php @@ -42,7 +42,7 @@ $text = $language->get(); //get submitted variables - $search = $_REQUEST['search']; + $search = $_REQUEST['search'] ?? ''; $default_setting_uuids = $_REQUEST["id"]; //toggle the setting diff --git a/core/default_settings/default_settings.php b/core/default_settings/default_settings.php index cc779ff59e..f1d17e4451 100644 --- a/core/default_settings/default_settings.php +++ b/core/default_settings/default_settings.php @@ -301,7 +301,7 @@ echo "
".$text['title-default_settings']."
".number_format($num_rows)."
\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['label-domain'],'icon'=>$settings->get('theme', 'button_icon_domain'),'style'=>'','link'=>PROJECT_PATH.'/core/domain_settings/domain_settings.php?id='.$domain_uuid]); - echo button::create(['label'=>$text['button-reload'],'icon'=>$settings->get('theme', 'button_icon_reload'),'type'=>'button','id'=>'button_reload','link'=>'default_settings_reload.php'.(!empty($search) ? '?search='.urlencode($search) : null),'style'=>'margin-right: 15px;']); + echo button::create(['label'=>$text['button-reload'],'icon'=>$settings->get('theme', 'button_icon_reload'),'type'=>'button','id'=>'button_reload','link'=>'default_settings_reload.php'.(!empty($search) ? '?search='.urlencode($search) : ''),'style'=>'margin-right: 15px;']); if ($permission['default_setting_add']) { echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add'),'id'=>'btn_add','link'=>'default_setting_edit.php?'.$query_string]); } diff --git a/core/domains/domain_json.php b/core/domains/domain_json.php index 1ef0def1c6..0b13473989 100644 --- a/core/domains/domain_json.php +++ b/core/domains/domain_json.php @@ -39,7 +39,7 @@ //get posted data if (!empty($_POST['search'])) { - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; } //add the search term diff --git a/core/domains/domains.php b/core/domains/domains.php index 1702b433c1..68562b408b 100644 --- a/core/domains/domains.php +++ b/core/domains/domains.php @@ -139,7 +139,7 @@ break; } - header('Location: domains.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: domains.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/core/email_templates/email_templates.php b/core/email_templates/email_templates.php index afa8e6b6e6..fc2d2c0927 100644 --- a/core/email_templates/email_templates.php +++ b/core/email_templates/email_templates.php @@ -46,7 +46,7 @@ if (!empty($_POST['email_templates'])) { $action = $_POST['action']; $category = $_POST['category'] ?? null; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $email_templates = $_POST['email_templates']; } @@ -73,7 +73,7 @@ break; } - header('Location: email_templates.php?'.(!empty($search) ? '&search='.urlencode($search) : null).(!empty($category) ? '&category='.urlencode($category) : null)); + header('Location: email_templates.php?'.(!empty($search) ? '&search='.urlencode($search) : '').(!empty($category) ? '&category='.urlencode($category) : null)); exit; } diff --git a/core/groups/group_permissions.php b/core/groups/group_permissions.php index a14d96da27..4f38e63e9c 100644 --- a/core/groups/group_permissions.php +++ b/core/groups/group_permissions.php @@ -95,7 +95,7 @@ //set message and redirect message::add($text['message-permissions_reloaded'],'positive'); - header('Location: group_permissions.php?group_uuid='.urlencode($_GET['group_uuid']).($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : null)); + header('Location: group_permissions.php?group_uuid='.urlencode($_GET['group_uuid']).($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : '')); exit; } } @@ -232,7 +232,7 @@ $token = new token; if (!$token->validate($_SERVER['PHP_SELF'])) { message::add($text['message-invalid_token'],'negative'); - header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid).($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : null)); + header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid).($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : '')); exit; } @@ -253,7 +253,7 @@ message::add($text['message-update']); //redirect - header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid).($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : null)); + header('Location: group_permissions.php?group_uuid='.urlencode($group_uuid).($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : '')); exit; } @@ -270,7 +270,7 @@ echo "
".$text['title-group_permissions']."
".escape($group_name)."
\n"; echo "
\n"; echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'id'=>'btn_back','style'=>'margin-right: 15px;','collapse'=>'hide-md-dn','link'=>'groups.php']); - echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$settings->get('theme', 'button_icon_reload'),'collapse'=>'hide-md-dn','link'=>'?group_uuid='.urlencode($group_uuid).'&action=reload'.($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : null)]); + echo button::create(['type'=>'button','label'=>$text['button-reload'],'icon'=>$settings->get('theme', 'button_icon_reload'),'collapse'=>'hide-md-dn','link'=>'?group_uuid='.urlencode($group_uuid).'&action=reload'.($view ? '&view='.urlencode($view) : null).($search ? '&search='.urlencode($search) : '')]); if (permission_exists('group_member_view')) { echo button::create(['type'=>'button','label'=>$text['button-members'],'icon'=>'users','collapse'=>'hide-md-dn','link'=>'group_members.php?group_uuid='.urlencode($group_uuid)]); } diff --git a/core/groups/groups.php b/core/groups/groups.php index 25860d3c19..cf5dd049a5 100644 --- a/core/groups/groups.php +++ b/core/groups/groups.php @@ -71,7 +71,7 @@ break; } - header('Location: groups.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: groups.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/core/menu/menu.php b/core/menu/menu.php index 5ba6855029..0686bf20aa 100644 --- a/core/menu/menu.php +++ b/core/menu/menu.php @@ -66,7 +66,7 @@ break; } - header('Location: menu.php'.(!empty($search) ? '?search='.urlencode($search) : null)); + header('Location: menu.php'.(!empty($search) ? '?search='.urlencode($search) : '')); exit; } diff --git a/core/user_logs/user_logs.php b/core/user_logs/user_logs.php index 5b2d1a75c2..dfae9687f8 100644 --- a/core/user_logs/user_logs.php +++ b/core/user_logs/user_logs.php @@ -57,7 +57,7 @@ //get the http post data if (!empty($_POST['user_logs']) && is_array($_POST['user_logs'])) { $action = $_POST['action']; - $search = $_POST['search']; + $search = $_POST['search'] ?? ''; $user_logs = $_POST['user_logs']; } @@ -87,7 +87,7 @@ } //redirect the user - header('Location: user_logs.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: user_logs.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; } diff --git a/core/users/users.php b/core/users/users.php index 83f26c6d9a..473d08e196 100644 --- a/core/users/users.php +++ b/core/users/users.php @@ -69,7 +69,7 @@ break; } - header('Location: users.php'.($search != '' ? '?search='.urlencode($search) : null)); + header('Location: users.php'.($search != '' ? '?search='.urlencode($search) : '')); exit; }