diff options
author | Simon Rettberg | 2017-12-01 12:30:23 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-12-01 12:30:23 +0100 |
commit | 5c23e7d7e1c9ade9755c530c9320ad7e5b463413 (patch) | |
tree | 0d3fe9af484faad0204e1c50d0c3b30b64f3f62d /modules-available/locationinfo/inc | |
parent | [locationinfo] Fix room scaling (diff) | |
download | slx-admin-5c23e7d7e1c9ade9755c530c9320ad7e5b463413.tar.gz slx-admin-5c23e7d7e1c9ade9755c530c9320ad7e5b463413.tar.xz slx-admin-5c23e7d7e1c9ade9755c530c9320ad7e5b463413.zip |
[statistics, roomplanner, locationinfo] Ignore machines with runmode:isclient==0
Diffstat (limited to 'modules-available/locationinfo/inc')
-rw-r--r-- | modules-available/locationinfo/inc/infopanel.inc.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/modules-available/locationinfo/inc/infopanel.inc.php b/modules-available/locationinfo/inc/infopanel.inc.php index dacf860f..aa4741ee 100644 --- a/modules-available/locationinfo/inc/infopanel.inc.php +++ b/modules-available/locationinfo/inc/infopanel.inc.php @@ -83,6 +83,12 @@ class InfoPanel $idList = array_keys($array); } + $ignoreList = array(); + if (Module::isAvailable('runmode')) { + // Ignore clients with special runmode not marked as still being a client + $ignoreList = RunMode::getAllClients(false, true); + } + $positionCol = $withPosition ? 'm.position,' : ''; $query = "SELECT m.locationid, m.machineuuid, $positionCol m.logintime, m.lastseen, m.lastboot, m.state FROM machine m WHERE m.locationid IN (:idlist)"; @@ -90,6 +96,8 @@ class InfoPanel // Iterate over matching machines while ($row = $dbquery->fetch(PDO::FETCH_ASSOC)) { + if (isset($ignoreList[$row['machineuuid']])) + continue; settype($row['locationid'], 'int'); if (!isset($array[$row['locationid']])) { $array[$row['locationid']] = array('id' => $row['locationid'], 'machines' => array()); @@ -219,4 +227,4 @@ class InfoPanel return $result; } -}
\ No newline at end of file +} |