summaryrefslogtreecommitdiffstats
path: root/modules-available/locationinfo/inc/locationinfo.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2017-01-18 15:20:02 +0100
committerSimon Rettberg2017-01-18 15:20:02 +0100
commit0fca0765b73724616c545345cbaa056bcd369292 (patch)
tree9be93fc7fdbea71de9ff1093c3d50575429bf35a /modules-available/locationinfo/inc/locationinfo.inc.php
parent[locationinfo] Remove hack in LocationInfo::getPcState() (diff)
downloadslx-admin-0fca0765b73724616c545345cbaa056bcd369292.tar.gz
slx-admin-0fca0765b73724616c545345cbaa056bcd369292.tar.xz
slx-admin-0fca0765b73724616c545345cbaa056bcd369292.zip
[locationinfo] Fix formatting
Diffstat (limited to 'modules-available/locationinfo/inc/locationinfo.inc.php')
-rw-r--r--modules-available/locationinfo/inc/locationinfo.inc.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/modules-available/locationinfo/inc/locationinfo.inc.php b/modules-available/locationinfo/inc/locationinfo.inc.php
index ec0c88c2..f81d79f6 100644
--- a/modules-available/locationinfo/inc/locationinfo.inc.php
+++ b/modules-available/locationinfo/inc/locationinfo.inc.php
@@ -3,27 +3,27 @@
class LocationInfo
{
- public static function getPcState($logintime, $lastseen) {
- /* pcState:
- * [0] = IDLE (NOT IN USE)
- * [1] = OCCUPIED (IN USE)
- * [2] = OFF
- * [3] = 10 days offline (BROKEN?)
- */
+ public static function getPcState($logintime, $lastseen)
+ {
+ /* pcState:
+ * [0] = IDLE (NOT IN USE)
+ * [1] = OCCUPIED (IN USE)
+ * [2] = OFF
+ * [3] = 10 days offline (BROKEN?)
+ */
- $NOW = time();
+ $NOW = time();
-
- if ($NOW - $lastseen > 864000) {
- return 3;
- } elseif ($NOW - $lastseen > 610) {
- return 2;
- } elseif ($logintime == 0) {
- return 0;
- } elseif ($logintime > 0) {
- return 1;
- }
- return -1;
- }
+ if ($NOW - $lastseen > 864000) {
+ return 3;
+ } elseif ($NOW - $lastseen > 610) {
+ return 2;
+ } elseif ($logintime == 0) {
+ return 0;
+ } elseif ($logintime > 0) {
+ return 1;
+ }
+ return -1;
+ }
}