diff options
author | Simon Rettberg | 2017-01-20 12:19:27 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-01-20 12:19:27 +0100 |
commit | c2affca145984d46056f91c0f7730275907cca0a (patch) | |
tree | 659fb2d1c41199601128044a19b84d3887453f2c /modules-available/locationinfo/page.inc.php | |
parent | Deleted the pcsubtable. Bugs/Usability fixes. (diff) | |
download | slx-admin-c2affca145984d46056f91c0f7730275907cca0a.tar.gz slx-admin-c2affca145984d46056f91c0f7730275907cca0a.tar.xz slx-admin-c2affca145984d46056f91c0f7730275907cca0a.zip |
[locationinfo] Take lastboot into account when calcing pc state
Diffstat (limited to 'modules-available/locationinfo/page.inc.php')
-rw-r--r-- | modules-available/locationinfo/page.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules-available/locationinfo/page.inc.php b/modules-available/locationinfo/page.inc.php index e9ce1159..20df023c 100644 --- a/modules-available/locationinfo/page.inc.php +++ b/modules-available/locationinfo/page.inc.php @@ -384,7 +384,7 @@ class Page_LocationInfo extends Page //TODO REMOVE FUNCTION. NOT NECCESSARY BUT AFTER TESTING pcSTATE private function ajaxShowLocation($id) { - $dbquery = Database::simpleQuery("SELECT machineuuid, clientip, position, logintime, lastseen FROM `machine` WHERE locationid = :id", array('id' => $id)); + $dbquery = Database::simpleQuery("SELECT machineuuid, clientip, position, logintime, lastseen, lastboot FROM `machine` WHERE locationid = :id", array('id' => $id)); $data = array(); @@ -392,7 +392,7 @@ class Page_LocationInfo extends Page $pc = array(); $pc['id'] = $dbdata['machineuuid']; $pc['ip'] = $dbdata['clientip']; - $pc['pcState'] = LocationInfo::getPcState($dbdata['logintime'], $dbdata['lastseen']); + $pc['pcState'] = LocationInfo::getPcState($dbdata); $position = json_decode($dbdata['position'], true); $pc['x'] = $position['gridRow']; |