Fix graphs for a search query (#14864)

This commit is contained in:
Mark Westerterp
2023-02-28 22:39:38 +01:00
committed by GitHub
parent c0fd1e15e2
commit d4556bdda5

View File

@@ -134,7 +134,7 @@ if ($format == 'graph') {
if (! empty($vars['searchquery'])) {
$where .= ' AND (sysName LIKE ? OR hostname LIKE ? OR display LIKE ? OR hardware LIKE ? OR os LIKE ? OR location LIKE ?)';
$sql_param += array_fill(count($param), 6, '%' . $vars['searchquery'] . '%');
$sql_param += array_fill(0, 6, '%' . $vars['searchquery'] . '%');
}
if (! empty($vars['os'])) {
$where .= ' AND os = ?';