From 620a97b2c99314859dafbcdd4aa61ddf1e63320e Mon Sep 17 00:00:00 2001 From: Freddie Cash Date: Thu, 21 May 2015 08:40:31 -0700 Subject: [PATCH] Search field parsing is slightly broken Fix to allow searching based on Location and Device Type. Without this fix, you can only search on one or the other, but not both. See Issue 1098 for more info. https://github.com/librenms/librenms/issues/1098 --- html/includes/table/devices.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/includes/table/devices.inc.php b/html/includes/table/devices.inc.php index f0aebfb58..66ed75112 100644 --- a/html/includes/table/devices.inc.php +++ b/html/includes/table/devices.inc.php @@ -38,7 +38,8 @@ if (!empty($_POST['ignore'])) { $sql .= " AND `ignore`= ?"; $param[] = $ if (!empty($_POST['location']) && $_POST['location'] == "Unset") { $location_filter = ''; } if (!empty($_POST['location'])) { $sql .= " AND (((`DB`.`attrib_value`='1' AND `DA`.`attrib_type`='override_sysLocation_string' AND `DA`.`attrib_value` = ?)) OR `location` = ?)"; - $param = array(mres($_POST['location']),mres($_POST['location'])); + $param[] = mres($_POST['location']); + $param[] = mres($_POST['location']); } if( !empty($_POST['group']) ) { require_once('../includes/device-groups.inc.php');