From 9bfb531d03b8980c51141fd2f2963d2a2dac2d64 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Tue, 12 Sep 2017 19:16:02 +0200 Subject: [PATCH] pool_ttf and bench fixes for more recent servers --- web/yaamp/core/backend/coins.php | 2 ++ web/yaamp/modules/bench/index.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/yaamp/core/backend/coins.php b/web/yaamp/core/backend/coins.php index bbf8f39..88d3aac 100644 --- a/web/yaamp/core/backend/coins.php +++ b/web/yaamp/core/backend/coins.php @@ -292,6 +292,8 @@ function BackendCoinsUpdate() if(isset($pool_rate[$coin->algo])) $coin->pool_ttf = $coin->difficulty * 0x100000000 / $pool_rate[$coin->algo]; + if ($coin->pool_ttf > 9999999999) $coin->pool_ttf = 0; + if(strstr($coin->image, 'http')) { $data = file_get_contents($coin->image); diff --git a/web/yaamp/modules/bench/index.php b/web/yaamp/modules/bench/index.php index b9e6ff1..f45cd6e 100644 --- a/web/yaamp/modules/bench/index.php +++ b/web/yaamp/modules/bench/index.php @@ -23,7 +23,8 @@ $algoFilter = $algo != 'all' ? ' AND B.algo='.sqlQuote($algo) : ''; $chips = array(); $in_db = dbolist("SELECT DISTINCT B.idchip as id, B.type, C.chip as name FROM benchmarks B". - " LEFT JOIN bench_chips C ON C.id=B.idchip WHERE B.idchip IS NOT NULL $algoFilter AND $sqlFilter GROUP BY B.idchip ORDER BY type DESC, name ASC"); + " LEFT JOIN bench_chips C ON C.id=B.idchip WHERE B.idchip IS NOT NULL $algoFilter AND $sqlFilter". + " GROUP BY B.idchip, B.type ORDER BY B.type DESC, name ASC"); foreach ($in_db as $row) { $chips[$row['id']] = $row['name']; }