From 58471b7ba9845d847240a3e9db7bb19ddc608ed1 Mon Sep 17 00:00:00 2001 From: kanoi Date: Fri, 25 Jul 2014 19:05:54 +1000 Subject: [PATCH] php - add 's' to last share as needed --- pool/page_workers.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pool/page_workers.php b/pool/page_workers.php index 136cd3b2..86e10e6c 100644 --- a/pool/page_workers.php +++ b/pool/page_workers.php @@ -1,6 +1,6 @@ Workers'; @@ -48,17 +48,25 @@ function doworkers($data, $user) { $lst = round($lst/60); if ($lst < 60) - $lstdes = $lst.'m'; + $lstdes = $lst.'min'; else { $lst = round($lst/60); if ($lst < 24) + { $lstdes = $lst.'hr'; + if ($lst != 1) + $lstdes .= 's'; + } else { $lst = round($lst/24); if ($lst < 9999) - $lstdes = $lst.'days'; + { + $lstdes = $lst.'day'; + if ($lst != 1) + $lstdes .= 's'; + } else $lstdes = 'never'; } @@ -88,6 +96,12 @@ function doworkers($data, $user) return $pg; } # +function doworkers($data, $user) +{ + $pg = doworker($data, $user); + return $pg; +} +# function show_workers($menu, $name, $user) { gopage(NULL, 'doworkers', $menu, $name, $user);