From d11ebcb652fb76391928bbbc0c338d4a5737e3a9 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 1 Dec 2017 13:25:39 +0100 Subject: [roomplanner] Sort already placed machines to the bottom --- modules-available/roomplanner/page.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules-available/roomplanner/page.inc.php') diff --git a/modules-available/roomplanner/page.inc.php b/modules-available/roomplanner/page.inc.php index b44d945d..bae9db7b 100644 --- a/modules-available/roomplanner/page.inc.php +++ b/modules-available/roomplanner/page.inc.php @@ -100,7 +100,7 @@ class Page_Roomplanner extends Page $query = Request::get('query', false, 'string'); $aquery = preg_replace('/[^\x01-\x7f]+/', '%', $query); - $result = Database::simpleQuery('SELECT machineuuid, macaddr, clientip, hostname ' + $result = Database::simpleQuery('SELECT machineuuid, macaddr, clientip, hostname, fixedlocationid ' . 'FROM machine ' . 'WHERE machineuuid LIKE :aquery ' . ' OR macaddr LIKE :aquery ' @@ -289,7 +289,7 @@ class Page_Roomplanner extends Page protected function getPotentialMachines() { - $result = Database::simpleQuery('SELECT m.machineuuid, m.macaddr, m.clientip, m.hostname, l.locationname AS otherroom + $result = Database::simpleQuery('SELECT m.machineuuid, m.macaddr, m.clientip, m.hostname, l.locationname AS otherroom, m.fixedlocationid FROM machine m LEFT JOIN location l ON (m.fixedlocationid = l.locationid AND m.subnetlocationid <> m.fixedlocationid) WHERE subnetlocationid = :locationid', ['locationid' => $this->locationid]); -- cgit v1.2.3-55-g7522