If search is not set use an empty string instead of null

This commit is contained in:
Mark J Crane
2025-10-22 10:04:34 -06:00
parent 136933fa57
commit 8d5572a943
52 changed files with 90 additions and 90 deletions

View File

@@ -96,7 +96,7 @@
} }
//redirect the user //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; exit;
} }
@@ -152,7 +152,7 @@
echo "<div class='action_bar' id='action_bar'>\n"; echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-access_controls']."</b><div class='count'>".number_format($num_rows)."</div></div>\n"; echo " <div class='heading'><b>".$text['title-access_controls']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n"; echo " <div class='actions'>\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')) { 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']); 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']);
} }

View File

@@ -52,7 +52,7 @@
//get the http post data //get the http post data
if (!empty($_POST['bridges'])) { if (!empty($_POST['bridges'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$bridges = $_POST['bridges']; $bridges = $_POST['bridges'];
} }
@@ -79,7 +79,7 @@
break; break;
} }
header('Location: bridges.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: bridges.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -51,7 +51,7 @@
//get posted data //get posted data
if (!empty($_POST['call_blocks'])) { if (!empty($_POST['call_blocks'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$call_blocks = $_POST['call_blocks']; $call_blocks = $_POST['call_blocks'];
} }
@@ -78,7 +78,7 @@
break; break;
} }
header('Location: call_block.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: call_block.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -52,7 +52,7 @@
//get posted data //get posted data
if (!empty($_POST['call_broadcasts'])) { if (!empty($_POST['call_broadcasts'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$call_broadcasts = $_POST['call_broadcasts']; $call_broadcasts = $_POST['call_broadcasts'];
} }
@@ -73,7 +73,7 @@
break; break;
} }
header('Location: call_broadcast.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: call_broadcast.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -48,7 +48,7 @@
//get posted data //get posted data
if (!empty($_POST['call_center_agents'])) { if (!empty($_POST['call_center_agents'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$call_center_agents = $_POST['call_center_agents']; $call_center_agents = $_POST['call_center_agents'];
} }
@@ -63,7 +63,7 @@
break; break;
} }
header('Location: call_center_agents.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: call_center_agents.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -51,7 +51,7 @@
//get posted data //get posted data
if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) { if (!empty($_POST['call_center_queues']) && is_array($_POST['call_center_queues'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$call_center_queues = $_POST['call_center_queues']; $call_center_queues = $_POST['call_center_queues'];
} }
@@ -72,7 +72,7 @@
break; break;
} }
header('Location: call_center_queues.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: call_center_queues.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -49,7 +49,7 @@
$list_row_edit_button = $settings->get('theme', 'list_row_edit_button', false); $list_row_edit_button = $settings->get('theme', 'list_row_edit_button', false);
//get search //get search
$search = $_REQUEST['search'] ?? null; $search = $_REQUEST['search'] ?? '';
//get posted data //get posted data
if (!empty($_POST['call_flows'])) { if (!empty($_POST['call_flows'])) {
@@ -82,7 +82,7 @@
break; break;
} }
header('Location: call_flows.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: call_flows.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -55,7 +55,7 @@
//get the http post data //get the http post data
if (!empty($_POST['call_recordings']) && is_array($_POST['call_recordings'])) { if (!empty($_POST['call_recordings']) && is_array($_POST['call_recordings'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$call_recordings = $_POST['call_recordings']; $call_recordings = $_POST['call_recordings'];
} }
@@ -83,7 +83,7 @@
} }
//redirect the user //redirect the user
header('Location: call_recordings.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: call_recordings.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -51,7 +51,7 @@
//get posted data //get posted data
if (!empty($_POST['conference_centers'])) { if (!empty($_POST['conference_centers'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$conference_centers = $_POST['conference_centers']; $conference_centers = $_POST['conference_centers'];
} }
@@ -80,7 +80,7 @@
break; break;
} }
header('Location: conference_centers.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: conference_centers.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -52,7 +52,7 @@
if (!empty($_POST['conference_rooms'])) { if (!empty($_POST['conference_rooms'])) {
$action = $_POST['action']; $action = $_POST['action'];
$toggle_field = $_POST['toggle_field']; $toggle_field = $_POST['toggle_field'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$conference_rooms = $_POST['conference_rooms']; $conference_rooms = $_POST['conference_rooms'];
} }
@@ -74,7 +74,7 @@
break; break;
} }
header('Location: conference_rooms.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: conference_rooms.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -48,7 +48,7 @@
//get the http post data //get the http post data
if (!empty($_POST['conference_controls'])) { if (!empty($_POST['conference_controls'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$conference_controls = $_POST['conference_controls']; $conference_controls = $_POST['conference_controls'];
} }
@@ -75,7 +75,7 @@
break; break;
} }
header('Location: conference_controls.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: conference_controls.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -50,7 +50,7 @@
//get the http post data //get the http post data
if (!empty($_POST['conference_profiles'])) { if (!empty($_POST['conference_profiles'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$conference_profiles = $_POST['conference_profiles']; $conference_profiles = $_POST['conference_profiles'];
} }
@@ -77,7 +77,7 @@
break; break;
} }
header('Location: conference_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: conference_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -51,7 +51,7 @@
//get posted data //get posted data
if (!empty($_POST['conferences'])) { if (!empty($_POST['conferences'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$conferences = $_POST['conferences']; $conferences = $_POST['conferences'];
} }
@@ -78,7 +78,7 @@
break; break;
} }
header('Location: conferences.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: conferences.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -79,7 +79,7 @@
break; break;
} }
header('Location: destinations.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: destinations.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -44,7 +44,7 @@
//get posted data //get posted data
if (!empty($_POST['profiles']) && is_array($_POST['profiles'])) { if (!empty($_POST['profiles']) && is_array($_POST['profiles'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$profiles = $_POST['profiles']; $profiles = $_POST['profiles'];
} }

View File

@@ -45,7 +45,7 @@
//get posted data //get posted data
if (!empty($_POST['vendors']) && is_array($_POST['vendors'])) { if (!empty($_POST['vendors']) && is_array($_POST['vendors'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$vendors = $_POST['vendors']; $vendors = $_POST['vendors'];
} }
@@ -66,7 +66,7 @@
break; break;
} }
header('Location: device_vendors.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: device_vendors.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -60,7 +60,7 @@
$action = $_POST['action']; $action = $_POST['action'];
$dialplans = $_POST['dialplans']; $dialplans = $_POST['dialplans'];
$context = $_POST['context']; $context = $_POST['context'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$order_by = $_POST['order_by']; $order_by = $_POST['order_by'];
$order = $_POST['order']; $order = $_POST['order'];
} }

View File

@@ -45,7 +45,7 @@
//get the http post data //get the http post data
if (!empty($_POST['email_queue']) && is_array($_POST['email_queue'])) { if (!empty($_POST['email_queue']) && is_array($_POST['email_queue'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$email_queue = $_POST['email_queue']; $email_queue = $_POST['email_queue'];
} }
@@ -90,7 +90,7 @@
} }
//redirect the user //redirect the user
header('Location: email_queue.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: email_queue.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -21,7 +21,7 @@ $text = $language->get();
//get the http post data //get the http post data
if (!empty($_POST['emergency_logs']) && is_array($_POST['emergency_logs'])) { if (!empty($_POST['emergency_logs']) && is_array($_POST['emergency_logs'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$emergency_logs = $_POST['emergency_logs']; $emergency_logs = $_POST['emergency_logs'];
} }
@@ -59,7 +59,7 @@ if (!empty($action) && !empty($emergency_logs) && is_array($emergency_logs) && @
} }
//redirect the user //redirect the user
header('Location: emergency.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: emergency.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -44,7 +44,7 @@
//get the http post data //get the http post data
if (!empty($_POST['event_guard_logs']) && is_array($_POST['event_guard_logs'])) { if (!empty($_POST['event_guard_logs']) && is_array($_POST['event_guard_logs'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$event_guard_logs = $_POST['event_guard_logs']; $event_guard_logs = $_POST['event_guard_logs'];
} }
@@ -73,7 +73,7 @@
} }
//redirect the user //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; exit;
} }

View File

@@ -49,7 +49,7 @@
//get the http post data //get the http post data
if (!empty($_POST['extension_settings'])) { if (!empty($_POST['extension_settings'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$extension_settings = $_POST['extension_settings']; $extension_settings = $_POST['extension_settings'];
} }
@@ -93,7 +93,7 @@
} }
//redirect the user //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; exit;
} }

View File

@@ -52,7 +52,7 @@
//get posted data //get posted data
if (!empty($_POST['extensions']) && is_array($_POST['extensions'])) { if (!empty($_POST['extensions']) && is_array($_POST['extensions'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$extensions = $_POST['extensions']; $extensions = $_POST['extensions'];
} }
@@ -77,7 +77,7 @@
break; 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; exit;
} }

View File

@@ -45,7 +45,7 @@
//get posted data //get posted data
if (!empty($_POST['fax_servers']) && is_array($_POST['fax_servers'])) { if (!empty($_POST['fax_servers']) && is_array($_POST['fax_servers'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$fax_servers = $_POST['fax_servers']; $fax_servers = $_POST['fax_servers'];
} }
@@ -66,7 +66,7 @@
break; break;
} }
header('Location: fax.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: fax.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -48,7 +48,7 @@
//get the http post data //get the http post data
if (!empty($_POST['fifo']) && is_array($_POST['fifo'])) { if (!empty($_POST['fifo']) && is_array($_POST['fifo'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$fifo = $_POST['fifo']; $fifo = $_POST['fifo'];
} }
@@ -86,7 +86,7 @@
} }
//redirect the user //redirect the user
header('Location: fifo.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: fifo.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -85,7 +85,7 @@
break; break;
} }
header('Location: gateways.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: gateways.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -50,7 +50,7 @@
//get posted data //get posted data
if (!empty($_POST['ivr_menus'])) { if (!empty($_POST['ivr_menus'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$ivr_menus = $_POST['ivr_menus']; $ivr_menus = $_POST['ivr_menus'];
} }
@@ -77,7 +77,7 @@
break; break;
} }
header('Location: ivr_menus.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: ivr_menus.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -56,7 +56,7 @@
$action = $_POST['action']; $action = $_POST['action'];
} }
if (!empty($_POST['search'])) { if (!empty($_POST['search'])) {
$search = $_POST['search']; $search = $_POST['search'] ?? '';
} }
//set from session variables //set from session variables
@@ -93,7 +93,7 @@
} }
//redirect to display updates //redirect to display updates
header('Location: modules.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: modules.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -51,7 +51,7 @@
//get the http post data //get the http post data
if (!empty($_POST['number_translations'])) { if (!empty($_POST['number_translations'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$number_translations = $_POST['number_translations']; $number_translations = $_POST['number_translations'];
} }
@@ -95,7 +95,7 @@
} }
//redirect the user //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; exit;
} }

View File

@@ -48,7 +48,7 @@
//get posted data //get posted data
if (!empty($_POST['phrases'])) { if (!empty($_POST['phrases'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$phrases = $_POST['phrases']; $phrases = $_POST['phrases'];
} }
@@ -78,7 +78,7 @@
break; break;
} }
header('Location: phrases.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: phrases.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -45,7 +45,7 @@
//get posted data //get posted data
if (is_array($_POST['pin_numbers'])) { if (is_array($_POST['pin_numbers'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$pin_numbers = $_POST['pin_numbers']; $pin_numbers = $_POST['pin_numbers'];
} }
@@ -72,7 +72,7 @@
break; break;
} }
header('Location: pin_numbers.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: pin_numbers.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -295,7 +295,7 @@
break; break;
} }
header('Location: recordings.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: recordings.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -45,7 +45,7 @@
//get common submitted data //get common submitted data
if (!empty($_REQUEST)) { if (!empty($_REQUEST)) {
$show = $_REQUEST['show'] ?? null; $show = $_REQUEST['show'] ?? null;
$search = $_REQUEST['search'] ?? null; $search = $_REQUEST['search'] ?? '';
$profile = $_REQUEST['profile'] ?? null; $profile = $_REQUEST['profile'] ?? null;
} }

View File

@@ -52,7 +52,7 @@
//get posted data //get posted data
if (!empty($_POST['ring_groups'])) { if (!empty($_POST['ring_groups'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$ring_groups = $_POST['ring_groups']; $ring_groups = $_POST['ring_groups'];
} }
@@ -73,7 +73,7 @@
break; break;
} }
header('Location: ring_groups.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: ring_groups.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -50,7 +50,7 @@
//get the http post data //get the http post data
if (!empty($_POST['sip_profiles'])) { if (!empty($_POST['sip_profiles'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$sip_profiles = $_POST['sip_profiles']; $sip_profiles = $_POST['sip_profiles'];
} }
@@ -71,7 +71,7 @@
break; break;
} }
header('Location: sip_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: sip_profiles.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -49,7 +49,7 @@
//get the http post data //get the http post data
if (!empty($_POST['sofia_global_settings'])) { if (!empty($_POST['sofia_global_settings'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$sofia_global_settings = $_POST['sofia_global_settings']; $sofia_global_settings = $_POST['sofia_global_settings'];
} }
@@ -78,7 +78,7 @@
} }
//redirect the user //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; exit;
} }

View File

@@ -48,7 +48,7 @@
//get the http post data //get the http post data
if (!empty($_POST['streams'])) { if (!empty($_POST['streams'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$streams = $_POST['streams']; $streams = $_POST['streams'];
} }
@@ -75,7 +75,7 @@
break; break;
} }
header('Location: streams.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: streams.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -45,7 +45,7 @@
//get the http post data //get the http post data
if (!empty($_POST['time_conditions']) && is_array($_POST['time_conditions'])) { if (!empty($_POST['time_conditions']) && is_array($_POST['time_conditions'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$time_conditions = $_POST['time_conditions']; $time_conditions = $_POST['time_conditions'];
} }
@@ -72,7 +72,7 @@
break; break;
} }
header('Location: time_conditions.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: time_conditions.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -76,7 +76,7 @@
break; break;
} }
header('Location: vars.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: vars.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -70,7 +70,7 @@
break; break;
} }
header('Location: voicemails.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: voicemails.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -51,7 +51,7 @@
//get posted data //get posted data
if (!empty($_POST['contacts'])) { if (!empty($_POST['contacts'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$contacts = $_POST['contacts']; $contacts = $_POST['contacts'];
} }
@@ -66,7 +66,7 @@
break; break;
} }
header('Location: contacts.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: contacts.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -45,7 +45,7 @@
//get the http post data //get the http post data
if (!empty($_POST['dashboards'])) { if (!empty($_POST['dashboards'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$dashboards = $_POST['dashboards']; $dashboards = $_POST['dashboards'];
} }
@@ -73,7 +73,7 @@
} }
//redirect the user //redirect the user
header('Location: dashboard.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: dashboard.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -62,7 +62,7 @@
//get the search variable //get the search variable
if (!empty($_REQUEST['search'])) { if (!empty($_REQUEST['search'])) {
$search = $_REQUEST['search']; $search = $_REQUEST['search'] ?? '';
} }
//get http post variables and set them to php variables //get http post variables and set them to php variables

View File

@@ -42,7 +42,7 @@
$text = $language->get(); $text = $language->get();
//get submitted variables //get submitted variables
$search = $_REQUEST['search']; $search = $_REQUEST['search'] ?? '';
$default_setting_uuids = $_REQUEST["id"]; $default_setting_uuids = $_REQUEST["id"];
//toggle the setting //toggle the setting

View File

@@ -301,7 +301,7 @@
echo " <div class='heading'><b>".$text['title-default_settings']."</b><div class='count'>".number_format($num_rows)."</div></div>\n"; echo " <div class='heading'><b>".$text['title-default_settings']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n"; echo " <div class='actions'>\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(['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']) { 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]); 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]);
} }

View File

@@ -39,7 +39,7 @@
//get posted data //get posted data
if (!empty($_POST['search'])) { if (!empty($_POST['search'])) {
$search = $_POST['search']; $search = $_POST['search'] ?? '';
} }
//add the search term //add the search term

View File

@@ -139,7 +139,7 @@
break; break;
} }
header('Location: domains.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: domains.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -46,7 +46,7 @@
if (!empty($_POST['email_templates'])) { if (!empty($_POST['email_templates'])) {
$action = $_POST['action']; $action = $_POST['action'];
$category = $_POST['category'] ?? null; $category = $_POST['category'] ?? null;
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$email_templates = $_POST['email_templates']; $email_templates = $_POST['email_templates'];
} }
@@ -73,7 +73,7 @@
break; 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; exit;
} }

View File

@@ -95,7 +95,7 @@
//set message and redirect //set message and redirect
message::add($text['message-permissions_reloaded'],'positive'); 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; exit;
} }
} }
@@ -232,7 +232,7 @@
$token = new token; $token = new token;
if (!$token->validate($_SERVER['PHP_SELF'])) { if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative'); 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; exit;
} }
@@ -253,7 +253,7 @@
message::add($text['message-update']); message::add($text['message-update']);
//redirect //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; exit;
} }
@@ -270,7 +270,7 @@
echo " <div class='heading'><b>".$text['title-group_permissions']."</b><div class='count'>".escape($group_name)."</div></div>\n"; echo " <div class='heading'><b>".$text['title-group_permissions']."</b><div class='count'>".escape($group_name)."</div></div>\n";
echo " <div class='actions'>\n"; echo " <div class='actions'>\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-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')) { 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)]); echo button::create(['type'=>'button','label'=>$text['button-members'],'icon'=>'users','collapse'=>'hide-md-dn','link'=>'group_members.php?group_uuid='.urlencode($group_uuid)]);
} }

View File

@@ -71,7 +71,7 @@
break; break;
} }
header('Location: groups.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: groups.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -66,7 +66,7 @@
break; break;
} }
header('Location: menu.php'.(!empty($search) ? '?search='.urlencode($search) : null)); header('Location: menu.php'.(!empty($search) ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -57,7 +57,7 @@
//get the http post data //get the http post data
if (!empty($_POST['user_logs']) && is_array($_POST['user_logs'])) { if (!empty($_POST['user_logs']) && is_array($_POST['user_logs'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'] ?? '';
$user_logs = $_POST['user_logs']; $user_logs = $_POST['user_logs'];
} }
@@ -87,7 +87,7 @@
} }
//redirect the user //redirect the user
header('Location: user_logs.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: user_logs.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }

View File

@@ -69,7 +69,7 @@
break; break;
} }
header('Location: users.php'.($search != '' ? '?search='.urlencode($search) : null)); header('Location: users.php'.($search != '' ? '?search='.urlencode($search) : ''));
exit; exit;
} }