From f39de488a48b091c047ec862e2e850b678d487de Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Mon, 27 Mar 2017 01:15:48 +0200 Subject: Changed pc states 0 = IDLE, 1 = OCCUPIED, 2 = OFF, 3 = BROKEN --- modules-available/locationinfo/inc/locationinfo.inc.php | 8 ++++---- 1 file changed, 4 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 4e2ea8aa..f924e469 100644 --- a/modules-available/locationinfo/inc/locationinfo.inc.php +++ b/modules-available/locationinfo/inc/locationinfo.inc.php @@ -25,13 +25,13 @@ class LocationInfo $NOW = time(); if ($NOW - $lastseen > 14 * 86400) { - return 3; + return "BROKEN"; } elseif (($NOW - $lastseen > 610) || $lastboot === 0) { - return 2; + return "OFF"; } elseif ($logintime === 0) { - return 0; + return "IDLE"; } elseif ($logintime > 0) { - return 1; + return "OCCUPIED"; } return -1; } -- cgit v1.2.3-55-g7522