diff --git a/app/bridges/bridges.php b/app/bridges/bridges.php
index c7816be23..dab22172d 100644
--- a/app/bridges/bridges.php
+++ b/app/bridges/bridges.php
@@ -108,7 +108,7 @@
$sql_search .= " or lower(bridge_destination) like :search ";
$sql_search .= " or lower(bridge_description) like :search ";
$sql_search .= ") ";
- $parameters['search'] = '%'.strtolower($search).'%';
+ $parameters['search'] = '%'.lower_case($search).'%';
}
//get the count
@@ -187,7 +187,7 @@
echo " \n";
}
}
- if (permission_exists('bridge_all') && (!isset($show) || $show != 'all')) {
+ if ($show !== 'all' && permission_exists('bridge_all')) {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$settings->get('theme', 'button_icon_all'),'link'=>'?show=all']);
}
echo " ";
diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php
index 7f19f97b0..7bf577947 100644
--- a/app/call_block/call_block.php
+++ b/app/call_block/call_block.php
@@ -104,11 +104,6 @@
exit;
}
-//add the search term
- if (!empty($_GET["search"])) {
- $search = strtolower($_GET["search"]);
- }
-
//get the count
$sql = "select count(*) from view_call_block ";
$sql .= "where true ";
@@ -144,7 +139,7 @@
$sql .= " or lower(call_block_data) like :search ";
$sql .= " or lower(call_block_description) like :search ";
$sql .= ") ";
- $parameters['search'] = '%'.$search.'%';
+ $parameters['search'] = '%'.lower_case($search).'%';
}
$num_rows = $database->select($sql, $parameters ?? null, 'column');
unset($parameters);
@@ -208,7 +203,7 @@
$sql .= " or lower(call_block_data) like :search ";
$sql .= " or lower(call_block_description) like :search ";
$sql .= ") ";
- $parameters['search'] = '%'.strtolower($search).'%';
+ $parameters['search'] = '%'.lower_case($search).'%';
}
$sql .= order_by($order_by, $order, ['domain_uuid','call_block_country_code','call_block_number']);
$sql .= limit_offset($rows_per_page, $offset);
@@ -254,14 +249,14 @@
echo " \n";
}
}
- if (permission_exists('call_block_all') && (!isset($show) || $show != 'all')) {
+ if ($show !== 'all' && permission_exists('call_block_all')) {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$settings->get('theme', 'button_icon_all'),'link'=>'?show=all']);
}
- echo "";
+ echo " ";
echo button::create(['label'=>$text['button-search'],'icon'=>$settings->get('theme', 'button_icon_search'),'type'=>'submit','id'=>'btn_search']);
//echo button::create(['label'=>$text['button-reset'],'icon'=>$settings->get('theme', 'button_icon_reset'),'type'=>'button','id'=>'btn_reset','link'=>'call_block.php','style'=>($search == '' ? 'display: none;' : null)]);
if (!empty($paging_controls_mini)) {
- echo "".$paging_controls_mini."";
+ echo " ".$paging_controls_mini."";
}
echo " \n";
echo " \n";