mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix bug with worded states in device-table
This commit is contained in:
@@ -30,8 +30,12 @@ if (!empty($_POST['type'])) {
|
||||
}
|
||||
}
|
||||
if (!empty($_POST['state'])) {
|
||||
$sql .= " AND status= ?"; $param[] = $state;
|
||||
$sql .= " AND disabled='0' AND `ignore`='0'"; $param[] = '';
|
||||
$sql .= " AND status= ?";
|
||||
if( is_numeric($_POST['state']) ) {
|
||||
$param[] = $_POST['state'];
|
||||
} else {
|
||||
$param[] = str_replace(array('up','down'),array(1,0),$_POST['state']);
|
||||
}
|
||||
}
|
||||
if (!empty($_POST['disabled'])) { $sql .= " AND disabled= ?"; $param[] = $_POST['disabled']; }
|
||||
if (!empty($_POST['ignore'])) { $sql .= " AND `ignore`= ?"; $param[] = $_POST['ignore']; }
|
||||
|
||||
Reference in New Issue
Block a user