aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-09-13 15:34:40 +0200
committerOleg Pudeyev <oleg@bsdpower.com>2011-11-25 15:04:31 -0500
commit0734dd3c42f573d819c058cd6c6b55d035d1836d (patch)
tree7e2f05c5576b0eb02311b2fa58a49ec7681564f3
parentf16d72fcfb9a7621bf64b82cc2c710c6e484d965 (diff)
downloadforums-0734dd3c42f573d819c058cd6c6b55d035d1836d.tar
forums-0734dd3c42f573d819c058cd6c6b55d035d1836d.tar.gz
forums-0734dd3c42f573d819c058cd6c6b55d035d1836d.tar.bz2
forums-0734dd3c42f573d819c058cd6c6b55d035d1836d.tar.xz
forums-0734dd3c42f573d819c058cd6c6b55d035d1836d.zip
[ticket/10345] Remove '1 hour ago' string which conflicted with plural rules
This message was only viewed for 1 second anyway, as floor($delta / 60) is only 60 for 3600 to 3660, but the code was limited to $delta <= 3600 PHPBB3-10345
-rw-r--r--phpBB/includes/session.php4
-rw-r--r--phpBB/language/en/common.php1
2 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 4e5257506c..4261a64169 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -2278,9 +2278,9 @@ class user extends session
// Zone offset
$zone_offset = $this->timezone + $this->dst;
- // Show date <= 1 hour ago as 'xx min ago' but not greater than 60 seconds in the future
+ // Show date < 1 hour ago as 'xx min ago' but not greater than 60 seconds in the future
// A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago'
- if ($delta <= 3600 && $delta > -60 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
+ if ($delta < 3600 && $delta > -60 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
{
return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
}
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index cf01c6f32e..b57c2d9747 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -746,7 +746,6 @@ $lang = array_merge($lang, array(
0 => 'less than a minute ago',
1 => '%d minute ago',
2 => '%d minutes ago',
- 60 => '1 hour ago',
),
'Sunday' => 'Sunday',