diff options
Diffstat (limited to 'modules-available/statistics/api.inc.php')
-rw-r--r-- | modules-available/statistics/api.inc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules-available/statistics/api.inc.php b/modules-available/statistics/api.inc.php index 7cb8a312..72fe4e7b 100644 --- a/modules-available/statistics/api.inc.php +++ b/modules-available/statistics/api.inc.php @@ -1,7 +1,7 @@ <?php if (Request::any('action') === 'test' && isLocalExecution()) { - HardwareInfo::parseMachine('0A5D9E23-80F4-9C43-912C-96D80AE7E80B', + HardwareParser::parseMachine('0A5D9E23-80F4-9C43-912C-96D80AE7E80B', file_get_contents('/tmp/bla.json')); echo 'Kweries: ' . Database::getQueryCount(); exit; @@ -130,7 +130,7 @@ if ($type[0] === '~') { . ' id44mb = :id44mb,' . ' live_tmpsize = 0, live_swapsize = 0, live_memsize = 0, live_cpuload = 255, live_cputemp = 0,' . ' badsectors = :badsectors,' - . ' data = :data,' + . ' data = ' . ($hasJson ? ':data' : "If(Left(data, 1) = '{', data, :data)") . ',' . ' state = :state ' . " WHERE machineuuid = :machineuuid AND state = :oldstate AND lastseen = :oldlastseen", $new); if ($res === 0) { @@ -163,7 +163,7 @@ if ($type[0] === '~') { } if ($hasJson) { - HardwareInfo::parseMachine($uuid, $data); + HardwareParser::parseMachine($uuid, $data); } // Check for suspicious hardware changes |