From 9b392041f4d0e9ab2cbc488e9e8fea1bd032da28 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Fri, 5 Jan 2018 15:34:00 -0600 Subject: [PATCH] bug: Fixed deletion of services + select query (#8030) GROUP BY was missing a field, causing the page to not populate Rows were missing their ID, causing them to stay there when deleted. --- html/pages/services.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/html/pages/services.inc.php b/html/pages/services.inc.php index 07547e5ab5..091241b8bb 100644 --- a/html/pages/services.inc.php +++ b/html/pages/services.inc.php @@ -122,10 +122,10 @@ require_once 'includes/modal/delete_service.inc.php';
= '5') { - $host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY `D`.`hostname`, `D`.`device_id` ORDER BY D.hostname'; + $host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY `D`.`hostname`, `D`.`device_id`, `D`.`sysName` ORDER BY D.hostname'; $host_par = array(); } else { - $host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S, devices_perms AS P WHERE D.device_id = S.device_id AND D.device_id = P.device_id AND P.user_id = ? GROUP BY `D`.`hostname`, `D`.`device_id` ORDER BY D.hostname'; + $host_sql = 'SELECT `D`.`device_id`,`D`.`hostname`,`D`.`sysName` FROM devices AS D, services AS S, devices_perms AS P WHERE D.device_id = S.device_id AND D.device_id = P.device_id AND P.user_id = ? GROUP BY `D`.`hostname`, `D`.`device_id`, `D`.`sysName` ORDER BY D.hostname'; $host_par = array($_SESSION['user_id']); } @@ -180,7 +180,7 @@ require_once 'includes/modal/delete_service.inc.php'; } $head = false; ?> - +