summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo
diff options
context:
space:
mode:
authorJannik Schönartz2016-12-06 18:06:22 +0100
committerJannik Schönartz2016-12-06 18:06:22 +0100
commit315c35badf1e1f3b20424bdb084133beb00aeee4 (patch)
treecad27b07a3a3b562c47bb49f6dde00cc3cecc0f8 /modules-available/locationinfo
parentMerge branch 'master' of git.openslx.org:openslx-ng/slx-admin into location-i... (diff)
downloadslx-admin-315c35badf1e1f3b20424bdb084133beb00aeee4.tar.gz
slx-admin-315c35badf1e1f3b20424bdb084133beb00aeee4.tar.xz
slx-admin-315c35badf1e1f3b20424bdb084133beb00aeee4.zip
Locationinfo: Fixed a bug where the api was sending the json with wrong information. Disabled pcState 2/3 because it's not working in the test environment because lastseen does not refresh.
Diffstat (limited to 'modules-available/locationinfo')
-rw-r--r--modules-available/locationinfo/api.inc.php2
-rw-r--r--modules-available/locationinfo/inc/locationinfo.inc.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/modules-available/locationinfo/api.inc.php b/modules-available/locationinfo/api.inc.php
index 2642ec78..c0b5c2fc 100644
--- a/modules-available/locationinfo/api.inc.php
+++ b/modules-available/locationinfo/api.inc.php
@@ -189,7 +189,7 @@ function getPcInfos($locationID, $coords) {
$computer['y'] = $position['gridRow'];
}
- $computer['pcState'] = LocationInfo::getPcState((int)$computer['logintime'], (int)$computer['lastseen']);
+ $computer['pcState'] = LocationInfo::getPcState((int)$pc['logintime'], (int)$pc['lastseen']);
$pcs[] = $computer;
}
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php
index 4f26519d..a93658b0 100644
--- a/modules-available/locationinfo/inc/locationinfo.inc.php
+++ b/modules-available/locationinfo/inc/locationinfo.inc.php
@@ -14,9 +14,9 @@ class LocationInfo
$NOW = time();
- if ($NOW - $lastseen > 864000) {
+ if ($NOW - $lastseen > 864000 && false) { // TODO: REMOVE FALSE. TEST in testenvironment is not possible
return 3;
- } elseif ($NOW - $lastseen > 610) {
+ } elseif ($NOW - $lastseen > 610 && false) { // TODO: REMOVE FALSE. TEST in testenvironment is not possible
return 2;
} elseif ($logintime == 0) {
return 0;