[git] web/qa.git branch master updated. 0ccc067

From: Date: Sat, 03 Mar 2012 13:09:43 +0000
Subject: [git] web/qa.git branch master updated. 0ccc067
Groups: php.qa 
Request: Send a blank email to php-qa+get-66121@lists.php.net to get a copy of this message
The branch, master on web/qa.git has been updated via 0ccc067b9dd74db46533d9d4d9e2a5e23cf477e1 (commit) from 9cde414d4023ea036c1ecf61bd85d585b2d9589b (commit) http://git.php.net/?p=web/qa.git;a=log;h=0ccc067b9dd74db46533d9d4d9e2a5e23cf477e1;hp=9cde414d4023ea036c1ecf61bd85d585b2d9589b Summary of changes: reports/reportsfunctions.php | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) -- Log ---------------------------------------- commit 0ccc067b9dd74db46533d9d4d9e2a5e23cf477e1 Author: Olivier Doucet <odoucet@php.net> Date: Sat Mar 3 14:00:32 2012 +0100 repair what I've broken with last commit (qa/reports) diff --git a/reports/reportsfunctions.php b/reports/reportsfunctions.php index 6511276..fcb8000 100644 --- a/reports/reportsfunctions.php +++ b/reports/reportsfunctions.php @@ -169,16 +169,20 @@ function format_readable_date($date) { $return = ''; if ($lastReport < 3600) { $tmpValue = round($lastReport/60); - $return = "$tmpValue ", ($tmpValue == 1) ? 'minute' : 'minutes'; + $return = $tmpValue.' '; + $return .= ($tmpValue == 1) ? 'minute' : 'minutes'; } elseif ($lastReport < 3600*24) { $tmpValue = round($lastReport/3600); - $return = "$tmpValue ", ($tmpValue == 1) ? 'hour' : 'hours'; + $return = $tmpValue.' '; + $return .= ($tmpValue == 1) ? 'hour' : 'hours'; } elseif ($lastReport < 3600*24*60) { $tmpValue = round($lastReport/3600/24); - $return = "$tmpValue ", ($tmpValue == 1) ? 'day' : 'days'; + $return = $tmpValue.' '; + $return .= ($tmpValue == 1) ? 'day' : 'days'; } else { $tmpValue = floor($lastReport/3600/24/30); - $return = "$tmpValue ", ($tmpValue == 1) ? 'month' : 'months'; + $return = $tmpValue.' '; + $return .= ($tmpValue == 1) ? 'month' : 'months'; } return $return." ago"; } Thank you for your contribution.

« previous php.qa (#66121) next »