From 797c1e79b43562e776652255bb6b0a2698b9b25d Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 9 Dec 2017 12:08:08 -0700 Subject: [PATCH] Update devices.php --- app/devices/devices.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/devices/devices.php b/app/devices/devices.php index f8267921e6..e7d21dc0fa 100644 --- a/app/devices/devices.php +++ b/app/devices/devices.php @@ -65,7 +65,7 @@ //prepare to page the results $sql = "select count(*) as num_rows from v_devices as d "; - if ($_GET['showall'] && permission_exists('device_all')) { + if ($_GET['show'] == "all" && permission_exists('device_all')) { if (strlen($search) > 0) { $sql .= "where "; } @@ -106,8 +106,8 @@ //prepare to page the results $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; - if ($_GET['showall'] && permission_exists('device_all')) { - $param = "&search=".$search."&showall=true"; + if ($_GET['show'] == "all" && permission_exists('device_all')) { + $param = "&search=".$search."&show=all"; } else { $param = "&search=".$search; } @@ -123,7 +123,7 @@ $sql .= " d.device_uuid_alternate = d2.device_uuid "; $sql .= " or d.device_uuid_alternate is null and d.device_uuid = d2.device_uuid "; $sql .= ") "; - if ($_GET['showall'] && permission_exists('device_all')) { + if ($_GET['show'] == "all" && permission_exists('device_all')) { //echo __line__."
\n"; } else { $sql .= "and ("; @@ -178,11 +178,11 @@ echo " \n"; } if (permission_exists('device_all')) { - if ($_GET['showall'] == 'true') { - echo " "; + if ($_GET['show'] == 'all') { + echo " "; } else { - echo " \n"; + echo " \n"; } } if (permission_exists('device_vendor_view')) { @@ -210,7 +210,7 @@ echo "\n"; echo "\n"; - if ($_GET['showall'] && permission_exists('device_all')) { + if ($_GET['show'] == "all" && permission_exists('device_all')) { echo th_order_by('domain_name', $text['label-domain'], $order_by, $order, $param); } echo th_order_by('device_mac_address', $text['label-device_mac_address'], $order_by, $order); @@ -239,7 +239,7 @@ foreach($devices as $row) { $tr_link = (permission_exists('device_edit')) ? "href='device_edit.php?id=".$row['device_uuid']."'" : null; echo "\n"; - if ($_GET['showall'] && permission_exists('device_all')) { + if ($_GET['show'] == "all" && permission_exists('device_all')) { echo " \n"; } echo "
".$_SESSION['domains'][$row['domain_uuid']]['domain_name']."";