From 0356b4992c661d61f55d6aba6752d7400e55f07c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 28 Oct 2019 16:40:32 -0600 Subject: [PATCH] Update call_block.php --- app/call_block/call_block.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/app/call_block/call_block.php b/app/call_block/call_block.php index c65fe5e2db..b29dbae3a4 100644 --- a/app/call_block/call_block.php +++ b/app/call_block/call_block.php @@ -99,7 +99,7 @@ } //prepare to page the results - $sql = "select count(*) from v_call_block "; + $sql = "select count(*) from view_call_block "; $sql .= "where domain_uuid = :domain_uuid "; if (isset($sql_search)) { $sql .= "and ".$sql_search; @@ -118,7 +118,11 @@ $offset = $rows_per_page * $page; //get the list - $sql = str_replace('count(*)', '*', $sql); + $sql = "select * from view_call_block "; + $sql .= "where domain_uuid = :domain_uuid "; + if (isset($sql_search)) { + $sql .= "and ".$sql_search; + } $sql .= order_by($order_by, $order, 'call_block_number'); $sql .= limit_offset($rows_per_page, $offset); $database = new database; @@ -174,6 +178,7 @@ echo " \n"; echo " \n"; } + echo th_order_by('extension', $text['label-extension'], $order_by, $order); echo th_order_by('call_block_number', $text['label-number'], $order_by, $order); echo th_order_by('call_block_name', $text['label-name'], $order_by, $order); echo th_order_by('call_block_count', $text['label-count'], $order_by, $order, '', "class='center'"); @@ -200,6 +205,14 @@ echo " \n"; } echo " "; + if (strlen($row['extension']) == 0) { + echo $text['label-all']; + } + else { + echo "".escape($row['extension']).""; + } + echo " \n"; + echo " "; if (permission_exists('call_block_edit')) { echo "".escape($row['call_block_number']).""; } @@ -243,4 +256,4 @@ //include the footer require_once "resources/footer.php"; -?> \ No newline at end of file +?>