Merge pull request #7896 from annando/ago-difference

Only show the difference between posting and receive date on difference
This commit is contained in:
Philipp 2019-12-03 08:40:21 +01:00 committed by GitHub
commit 0641212187
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -379,8 +379,9 @@ class Post extends BaseObject
$tags = Term::populateTagsFromItem($item);
$ago = Temporal::getRelativeDate($item['created']);
if (Config::get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > Config::get('system', 'show_received_seconds'))) {
$ago = L10n::t('%s (Received %s)', $ago, Temporal::getRelativeDate($item['received']));
$ago_received = Temporal::getRelativeDate($item['received']);
if (Config::get('system', 'show_received') && (abs(strtotime($item['created']) - strtotime($item['received'])) > Config::get('system', 'show_received_seconds')) && ($ago != $ago_received)) {
$ago = L10n::t('%s (Received %s)', $ago, $ago_received);
}
$tmp_item = [