From 3e8f744526e0219adeb3ee12701bed3d2a796331 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 9 Dec 2017 12:19:00 -0700 Subject: [PATCH] Update destinations.php --- app/destinations/destinations.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/destinations/destinations.php b/app/destinations/destinations.php index a98affa589..a1241601aa 100644 --- a/app/destinations/destinations.php +++ b/app/destinations/destinations.php @@ -63,7 +63,7 @@ //get total destination count from the database $sql = "select count(*) as num_rows from v_destinations "; $sql .= "where destination_type = '".$destination_type."' "; - if ($_GET['showall'] && permission_exists('destination_all')) { + if ($_GET['show'] == "all" && permission_exists('destination_all')) { //show all } else { $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; @@ -89,8 +89,8 @@ //prepare to page the results $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; $param = "&search=".$search; - if ($_GET['showall'] && permission_exists('destination_all')) { - $param .= "&showall=true"; + if ($_GET['showl'] == "all" && permission_exists('destination_all')) { + $param .= "&show=all"; } $page = $_GET['page']; if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } @@ -100,7 +100,7 @@ //get the list $sql = "select * from v_destinations "; $sql .= "where destination_type = '".$destination_type."' "; - if ($_GET['showall'] && permission_exists('destination_all')) { + if ($_GET['show'] == "all" && permission_exists('destination_all')) { //show all } else { $sql .= "and (domain_uuid = '".$domain_uuid."' or domain_uuid is null) "; @@ -144,11 +144,11 @@ } if (permission_exists('destination_all')) { - if ($_GET['showall'] == 'true') { - echo " "; + if ($_GET['show'] == 'all') { + echo " "; } else { - echo " \n"; + echo " \n"; } } @@ -174,7 +174,7 @@ echo "\n"; echo "\n"; - if ($_GET['showall'] && permission_exists('destination_all')) { + if ($_GET['show'] == "all" && permission_exists('destination_all')) { echo th_order_by('domain_name', $text['label-domain-name'], $order_by, $order, '', '', $param); } echo th_order_by('destination_type', $text['label-destination_type'], $order_by, $order, '', '', $param); @@ -195,7 +195,7 @@ foreach($destinations as $row) { $tr_link = "href='destination_edit.php?id=".$row['destination_uuid']."'"; echo "\n"; - if ($_GET['showall'] && permission_exists('destination_all')) { + if ($_GET['show'] == "all" && permission_exists('destination_all')) { echo " \n"; } echo " \n"; @@ -218,7 +218,7 @@ } //end if results echo "\n"; - if ($_GET['showall'] && permission_exists('destination_all')) { + if ($_GET['show'] == "all" && permission_exists('destination_all')) { echo "
".$_SESSION['domains'][$row['domain_uuid']]['domain_name']."".ucwords($row['destination_type'])."
\n"; } else {