diff options
| author | Simon Rettberg | 2025-02-13 15:51:15 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2025-02-13 15:51:15 +0100 |
| commit | 2e70e67ac564082d0e82f5384fabbea796d6fd9c (patch) | |
| tree | 812dc1f5a870929fc9e9bd01499ec6cfdd0c6ebb /modules-available/statistics/api.inc.php | |
| parent | [locationinfo] Change $forceCached to a flexible timeout approach (diff) | |
| download | slx-admin-2e70e67ac564082d0e82f5384fabbea796d6fd9c.tar.gz slx-admin-2e70e67ac564082d0e82f5384fabbea796d6fd9c.tar.xz slx-admin-2e70e67ac564082d0e82f5384fabbea796d6fd9c.zip | |
[statistics] Provide last runmode to events on ~poweron
Diffstat (limited to 'modules-available/statistics/api.inc.php')
| -rw-r--r-- | modules-available/statistics/api.inc.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules-available/statistics/api.inc.php b/modules-available/statistics/api.inc.php index f0996cca..893221d6 100644 --- a/modules-available/statistics/api.inc.php +++ b/modules-available/statistics/api.inc.php @@ -32,7 +32,7 @@ if ($type[0] === '~') { $mode = Request::post('mode', false, 'string'); $NOW = time(); $old = Database::queryFirst('SELECT clientip, locationid, logintime, lastseen, lastboot, state, mbram, - cpumodel, live_memfree, live_swapfree, live_tmpfree + cpumodel, live_memfree, live_swapfree, live_tmpfree, currentrunmode FROM machine WHERE machineuuid = :uuid', array('uuid' => $uuid)); if ($old !== false) { settype($old['logintime'], 'integer'); @@ -200,6 +200,7 @@ if ($type[0] === '~') { // Add anything not present in $new from $old $new += $old; $new['oldlastboot'] = $old['lastboot']; + $new['lastrunmode'] = $old['currentrunmode']; } else { // First boot, mock some important fields for event log filtering $new['oldlastboot'] = 0; |
