From e9271984cda1dbe28a1520d08a5d400381f54eaa Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 14 Jul 2016 14:03:17 +0200 Subject: [statistics] Allow larger RAM... --- modules-available/statistics/api.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules-available/statistics/api.inc.php') diff --git a/modules-available/statistics/api.inc.php b/modules-available/statistics/api.inc.php index 3a2f2440..1cd578d8 100644 --- a/modules-available/statistics/api.inc.php +++ b/modules-available/statistics/api.inc.php @@ -18,7 +18,7 @@ if ($type{0} === '~') { $macaddr = Request::post('macaddr', '', 'string'); if (!empty($macaddr) && substr($uuid, 0, 16) === '000000000000000-') { // Override uuid if the mac is known and unique - $res = Database::simpleQuery('SELECT machineuuid FROM machine WHERE macaddr = :macaddr', array('macaddr' => $macaddr)); + $res = Database::simpleQuery('SELECT machineuuid FROM machine WHERE macaddr = :macaddr AND machineuuid <> :uuid', compact('macaddr', 'uuid')); $override = false; while ($row = $res->fetch(PDO::FETCH_ASSOC)) { if ($override !== false) { @@ -46,7 +46,7 @@ if ($type{0} === '~') { $realcores = Request::post('realcores', 0, 'integer'); if ($realcores < 0 || $realcores > 512) $realcores = 0; $mbram = Request::post('mbram', 0, 'integer'); - if ($mbram < 0 || $mbram > 102400) $mbram = 0; + if ($mbram < 0 || $mbram > 2048000) $mbram = 0; $kvmstate = Request::post('kvmstate', 'UNKNOWN', 'string'); $valid = array('UNKNOWN', 'UNSUPPORTED', 'DISABLED', 'ENABLED'); if (!in_array($kvmstate, $valid)) $kvmstate = 'UNKNOWN'; -- cgit v1.2.3-55-g7522