mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user