From 61b1c5547b33dfc7b4a94c6797b887901891e1ea Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Wed, 30 Nov 2022 09:35:38 -0700 Subject: [PATCH] Update call_block.php (#6500) show all domains when using show all use the correct permission for show all access --- app/call_block/call_block.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php index 09c6af8d0a..5fa5a5f10e 100644 --- a/app/call_block/call_block.php +++ b/app/call_block/call_block.php @@ -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 "