summaryrefslogtreecommitdiffstats
path: root/apis/clientlog.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'apis/clientlog.inc.php')
-rw-r--r--apis/clientlog.inc.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apis/clientlog.inc.php b/apis/clientlog.inc.php
index c48fcdb0..9c261731 100644
--- a/apis/clientlog.inc.php
+++ b/apis/clientlog.inc.php
@@ -64,7 +64,7 @@ if ($type{0} === '~') {
// See if we have a lingering session, create statistic entry if so
if ($old !== false && $old['logintime'] !== 0) {
$sessionLength = $old['lastseen'] - $old['logintime'];
- if ($sessionLength > 0) {
+ if ($sessionLength > 0 && $sessionLength < 86400*2) {
$start = $old['logintime'];
if ($start === 0) $start = $NOW;
Database::exec('INSERT INTO statistic (dateline, typeid, machineuuid, clientip, username, data)'
@@ -78,7 +78,7 @@ if ($type{0} === '~') {
}
// Write poweroff period length to statistic table
if ($old !== false) {
- $lastSeen = $old['lastseen'] + 300;
+ $lastSeen = $old['lastseen'] + 500;
$offtime = ($NOW - $uptime) - $lastSeen;
if ($offtime > 600 && $offtime < 86400 * 90) {
Database::exec('INSERT INTO statistic (dateline, typeid, machineuuid, clientip, username, data)'
@@ -101,7 +101,7 @@ if ($type{0} === '~') {
. ' macaddr = VALUES(macaddr),'
. ' clientip = VALUES(clientip),'
. ' lastseen = VALUES(lastseen),'
- . ($uptime < 120 ? ' logintime = 0,' : '')
+ . ($uptime < 180 ? ' logintime = 0,' : '')
. ' lastboot = VALUES(lastboot),'
. ' realcores = VALUES(realcores),'
. ' mbram = VALUES(mbram),'
@@ -164,7 +164,7 @@ if ($type{0} === '~') {
}
}
// 9) Log last session length if applicable
- if ($sessionLength > 0) {
+ if ($sessionLength > 0 && $sessionLength < 86400*2) {
$start = $old['logintime'];
if ($start === 0) $start = $NOW;
Database::exec('INSERT INTO statistic (dateline, typeid, machineuuid, clientip, username, data)'
@@ -178,7 +178,7 @@ if ($type{0} === '~') {
} elseif ($type === '~poweroff') {
if ($old !== false && (int)$old['logintime'] !== 0) {
$sessionLength = $old['lastseen'] - $old['logintime'];
- if ($sessionLength > 0) {
+ if ($sessionLength > 0 && $sessionLength < 86400*2) {
$start = $old['logintime'];
if ($start === 0) $start = $NOW;
Database::exec('INSERT INTO statistic (dateline, typeid, clientip, username, data)'