From 30448ecd220b2a2d076314f4b3e9283c10a2e017 Mon Sep 17 00:00:00 2001 From: Dumann <28637371+Dummann@users.noreply.github.com> Date: Mon, 29 Jan 2018 02:01:54 +0100 Subject: [PATCH 1/2] Fix for estimated time Current code is copy/paste and contains bugs. For example when days = 1 and hours > 1 it currently does not display anything. --- index.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/index.php b/index.php index f30843d..da0b181 100755 --- a/index.php +++ b/index.php @@ -142,16 +142,12 @@ Your stake weight is {$x['stakeweight']}.

"?> - Your estimated time to earn rewards is "?> - "?> - "?> - 1 && $days < 1)echo "$hours hours $minutes minutes.

"?> - - - - 1)echo "$days days $hours hours $minutes minutes"?> - 1)echo "$days days $hours hour $minutes minutes"?> - 1 && $days > 1)echo "$days days $hours hours $minutes minutes"?> + Your estimated time to earn rewards is "; + if ($days) echo $days . " day" . (($days > 1)?"s ":" "); + if ($days || $hours) echo $hours . " hour" . (($hours)?"s ":" "); + echo $minutes . " minutes"; + ?>

From 811d1278237aa4a708a88a7a67aa97decd11404d Mon Sep 17 00:00:00 2001 From: Dumann <28637371+Dummann@users.noreply.github.com> Date: Mon, 29 Jan 2018 02:08:29 +0100 Subject: [PATCH 2/2] Update index.php --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index da0b181..1a1a73e 100755 --- a/index.php +++ b/index.php @@ -144,8 +144,8 @@ Your estimated time to earn rewards is "; - if ($days) echo $days . " day" . (($days > 1)?"s ":" "); - if ($days || $hours) echo $hours . " hour" . (($hours)?"s ":" "); + if ($days) echo $days . " day" . ($days > 1?"s ":" "); + if ($days || $hours) echo $hours . " hour" . ($hours?"s ":" "); echo $minutes . " minutes"; ?>