mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update call_block.php (#6500)
show all domains when using show all use the correct permission for show all access
This commit is contained in:
@@ -98,9 +98,9 @@
|
||||
//prepare to page the results
|
||||
$sql = "select count(*) from view_call_block ";
|
||||
$sql .= "where true ";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
if ($_GET['show'] == "all" && permission_exists('call_block_all')) {
|
||||
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
else {
|
||||
$sql .= "and (domain_uuid = :domain_uuid) ";
|
||||
@@ -127,7 +127,7 @@
|
||||
//prepare to page the results
|
||||
$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50;
|
||||
$param = "&search=".$search;
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
if ($_GET['show'] == "all" && permission_exists('call_block_all')) {
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'];
|
||||
@@ -139,9 +139,9 @@
|
||||
//get the list
|
||||
$sql = "select * from view_call_block ";
|
||||
$sql .= "where true ";
|
||||
if ($_GET['show'] == "all" && permission_exists('call_forward_all')) {
|
||||
$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
if ($_GET['show'] == "all" && permission_exists('call_block_all')) {
|
||||
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
|
||||
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
else {
|
||||
$sql .= "and (domain_uuid = :domain_uuid) ";
|
||||
@@ -192,7 +192,7 @@
|
||||
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'id'=>'btn_delete','name'=>'btn_delete','style'=>'display: none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
|
||||
}
|
||||
echo "<form id='form_search' class='inline' method='get'>\n";
|
||||
if (permission_exists('call_forward_all')) {
|
||||
if (permission_exists('call_block_all')) {
|
||||
if ($_GET['show'] == 'all') {
|
||||
echo " <input type='hidden' name='show' value='all'>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user