From 086ded6ceb74b5d540fac3b405d9af8e967ac59f Mon Sep 17 00:00:00 2001 From: Rosiak Date: Thu, 30 Jun 2016 21:36:43 +0200 Subject: [PATCH] Add sysName to ajax_search #3756 --- html/ajax_search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/ajax_search.php b/html/ajax_search.php index ba9dc79b7f..85df19ffb9 100644 --- a/html/ajax_search.php +++ b/html/ajax_search.php @@ -50,7 +50,7 @@ if (isset($_REQUEST['search'])) { else if ($_REQUEST['type'] == 'device') { // Device search if (is_admin() === true || is_read() === true) { - $results = dbFetchRows("SELECT * FROM `devices` WHERE `hostname` LIKE '%".$search."%' OR `location` LIKE '%".$search."%' ORDER BY hostname LIMIT ".$limit); + $results = dbFetchRows("SELECT * FROM `devices` WHERE `hostname` LIKE '%".$search."%' OR `location` LIKE '%".$search."%' OR `sysName` LIKE '%".$search."%' ORDER BY hostname LIMIT ".$limit); } else { $results = dbFetchRows("SELECT * FROM `devices` AS `D`, `devices_perms` AS `P` WHERE `P`.`user_id` = ? AND `P`.`device_id` = `D`.`device_id` AND (`hostname` LIKE '%".$search."%' OR `location` LIKE '%".$search."%') ORDER BY hostname LIMIT ".$limit, array($_SESSION['user_id']));