diff options
author | Simon Rettberg | 2017-01-18 15:17:57 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-01-18 15:17:57 +0100 |
commit | 0cba7d5cee7afd0da152b60532d2efcb5109a066 (patch) | |
tree | 5b92b261e94463427e6bbba3b7967e10c70a484e /modules-available/locationinfo/inc | |
parent | Merge branch 'master' into location-info-panel (diff) | |
download | slx-admin-0cba7d5cee7afd0da152b60532d2efcb5109a066.tar.gz slx-admin-0cba7d5cee7afd0da152b60532d2efcb5109a066.tar.xz slx-admin-0cba7d5cee7afd0da152b60532d2efcb5109a066.zip |
[locationinfo] Remove hack in LocationInfo::getPcState()
Diffstat (limited to 'modules-available/locationinfo/inc')
-rw-r--r-- | modules-available/locationinfo/inc/locationinfo.inc.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php index a93658b0..ec0c88c2 100644 --- a/modules-available/locationinfo/inc/locationinfo.inc.php +++ b/modules-available/locationinfo/inc/locationinfo.inc.php @@ -2,8 +2,8 @@ class LocationInfo { - //TODO TEST WITH NEWER DB - public function getPcState($logintime, $lastseen) { + + public static function getPcState($logintime, $lastseen) { /* pcState: * [0] = IDLE (NOT IN USE) * [1] = OCCUPIED (IN USE) @@ -14,9 +14,9 @@ class LocationInfo $NOW = time(); - if ($NOW - $lastseen > 864000 && false) { // TODO: REMOVE FALSE. TEST in testenvironment is not possible + if ($NOW - $lastseen > 864000) { return 3; - } elseif ($NOW - $lastseen > 610 && false) { // TODO: REMOVE FALSE. TEST in testenvironment is not possible + } elseif ($NOW - $lastseen > 610) { return 2; } elseif ($logintime == 0) { return 0; @@ -25,4 +25,5 @@ class LocationInfo } return -1; } + } |