diff options
author | Simon Rettberg | 2017-01-18 15:20:02 +0100 |
---|---|---|
committer | Simon Rettberg | 2017-01-18 15:20:02 +0100 |
commit | 0fca0765b73724616c545345cbaa056bcd369292 (patch) | |
tree | 9be93fc7fdbea71de9ff1093c3d50575429bf35a /modules-available/locationinfo/inc | |
parent | [locationinfo] Remove hack in LocationInfo::getPcState() (diff) | |
download | slx-admin-0fca0765b73724616c545345cbaa056bcd369292.tar.gz slx-admin-0fca0765b73724616c545345cbaa056bcd369292.tar.xz slx-admin-0fca0765b73724616c545345cbaa056bcd369292.zip |
[locationinfo] Fix formatting
Diffstat (limited to 'modules-available/locationinfo/inc')
-rw-r--r-- | modules-available/locationinfo/inc/locationinfo.inc.php | 40 |
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; + } } |