From 0cba7d5cee7afd0da152b60532d2efcb5109a066 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 18 Jan 2017 15:17:57 +0100 Subject: [locationinfo] Remove hack in LocationInfo::getPcState() --- modules-available/locationinfo/inc/locationinfo.inc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'modules-available/locationinfo/inc/locationinfo.inc.php') 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; } + } -- cgit v1.2.3-55-g7522