From d3a624fc33775c6cfb5924c315e20a526d8a2987 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 7 Mar 2015 22:51:32 +0000 Subject: [PATCH] Finish the device show all button. --- app/devices/devices.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/app/devices/devices.php b/app/devices/devices.php index bd9920e57c..10aef7e3c0 100644 --- a/app/devices/devices.php +++ b/app/devices/devices.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Copyright (C) 2008-2012 All Rights Reserved. + Copyright (C) 2008-2015 All Rights Reserved. Contributor(s): Mark J Crane @@ -58,8 +58,11 @@ else { echo " \n"; echo " \n"; echo "
\n"; - if (permission_exists('destination_show_all')) { + if (permission_exists('device_show_all')) { echo " \n"; + if ($_GET['showall'] == 'true') { + echo " "; + } } if (permission_exists('device_profile_view')) { echo "     "; @@ -85,7 +88,9 @@ else { $sql .= " or domain_uuid is null "; } $sql .= ") "; - $sql .= "and "; + if (strlen($search) > 0) { + $sql .= "and "; + } } if (strlen($search) > 0) { $sql .= "("; @@ -130,7 +135,9 @@ else { $sql .= " or domain_uuid is null "; } $sql .= ") "; - $sql .= "and "; + if (strlen($search) > 0) { + $sql .= "and "; + } } if (strlen($search) > 0) { $sql .= "("; @@ -185,7 +192,7 @@ else { $tr_link = (permission_exists('device_edit')) ? "href='device_edit.php?id=".$row['device_uuid']."'" : null; echo "\n"; if ($_GET['showall'] && permission_exists('device_show_all')) { - echo " ".$row['domain_uuid']."\n"; + echo " ".$_SESSION['domains'][$row['domain_uuid']]['domain_name']."\n"; } echo " "; $device_mac_address = substr($row['device_mac_address'], 0,2).'-'.substr($row['device_mac_address'], 2,2).'-'.substr($row['device_mac_address'], 4,2).'-'.substr($row['device_mac_address'], 6,2).'-'.substr($row['device_mac_address'], 8,2).'-'.substr($row['device_mac_address'], 10,2); @@ -230,4 +237,5 @@ else { //include the footer require_once "resources/footer.php"; + ?> \ No newline at end of file