From 647fe51a2048227f8579b4582d23283c7018b089 Mon Sep 17 00:00:00 2001 From: kanoi Date: Tue, 12 Aug 2014 01:53:05 +1000 Subject: [PATCH] php - align hash rates better --- pool/page_workers.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pool/page_workers.php b/pool/page_workers.php index 86e10e6c..83c5da01 100644 --- a/pool/page_workers.php +++ b/pool/page_workers.php @@ -82,10 +82,15 @@ function doworker($data, $user) else { $uhr /= 10000000; - if ($uhr < 100000) - $uhr = (round($uhr)/100).'GHs'; + if ($uhr < 0.01) + $uhr = '0GHs'; else - $uhr = (round($uhr/1000)/100).'THs'; + { + if ($uhr < 100000) + $uhr = number_format(round($uhr)/100,2).'GHs'; + else + $uhr = number_format(round($uhr/1000)/100,2).'THs'; + } } $pg .= "$uhr"; $pg .= "\n";