diff options
author | Joecowboy <i7wasn7m3@gmail.com> | 2012-01-05 21:30:16 -0600 |
---|---|---|
committer | Joecowboy <i7wasn7m3@gmail.com> | 2012-01-05 21:30:16 -0600 |
commit | b10268ca95b930ca2bda29016fcb32ec8eb7aa3e (patch) | |
tree | 8ee3dbdf9c2c4750e22589ba3511406edaed4fb2 /usr/local/www/includes | |
parent | 135a095656d54923ed52146259782404b05698e1 (diff) | |
download | pfsense-b10268ca95b930ca2bda29016fcb32ec8eb7aa3e.zip pfsense-b10268ca95b930ca2bda29016fcb32ec8eb7aa3e.tar.gz |
Fixed the get_time() out put fixed. Tweaked my changes made a tighter code.
Diffstat (limited to 'usr/local/www/includes')
-rw-r--r-- | usr/local/www/includes/functions.inc.php | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 041fd55..961f925 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -96,21 +96,15 @@ function get_uptime() { $uptimestr .= "1 Day "; if ($uphours > 1) - $hours = "Hours"; - else if ($uphours > 0) - $hours = "Hour"; - + $hours = "s"; + if ($upmins > 1) - $minutes = "Minutes"; - else if ($uphours > 0) - $minutes = "Minute"; - + $minutes = "s"; + if ($upmins > 1) - $seconds = "Seconds"; - else if ($uphours > 0) - $seconds = "Second"; - - $uptimestr .= sprintf("%02d $hours %02d $minutes %02d $seconds", $uphours, $upmins, $upsecs); + $seconds = "s"; + + $uptimestr .= sprintf("%02d Hour$hours %02d Minute$minutes %02d Second$seconds", $uphours, $upmins, $upsecs); return $uptimestr; } |