diff options
author | Simon Rettberg | 2016-07-14 14:03:17 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-07-14 14:03:17 +0200 |
commit | e9271984cda1dbe28a1520d08a5d400381f54eaa (patch) | |
tree | 6776107b5cc7e701b515945e38aef56037c6cda4 /modules-available/statistics/api.inc.php | |
parent | Update translations (diff) | |
download | slx-admin-e9271984cda1dbe28a1520d08a5d400381f54eaa.tar.gz slx-admin-e9271984cda1dbe28a1520d08a5d400381f54eaa.tar.xz slx-admin-e9271984cda1dbe28a1520d08a5d400381f54eaa.zip |
[statistics] Allow larger RAM...
Diffstat (limited to 'modules-available/statistics/api.inc.php')
-rw-r--r-- | modules-available/statistics/api.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
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'; |