mirror of
https://github.com/friendica/friendica
synced 2025-04-27 13:10:10 +00:00
Show the received date along with the creation date of posts
This commit is contained in:
parent
e1f9dd5bb5
commit
02875df596
2 changed files with 13 additions and 4 deletions
|
@ -378,6 +378,11 @@ 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']));
|
||||
}
|
||||
|
||||
$tmp_item = [
|
||||
'template' => $this->getTemplate(),
|
||||
'type' => implode("", array_slice(explode("/", $item['verb']), -1)),
|
||||
|
@ -412,7 +417,7 @@ class Post extends BaseObject
|
|||
'sparkle' => $sparkle,
|
||||
'title' => $title_e,
|
||||
'localtime' => DateTimeFormat::local($item['created'], 'r'),
|
||||
'ago' => $item['app'] ? L10n::t('%s from %s', Temporal::getRelativeDate($item['created']), $item['app']) : Temporal::getRelativeDate($item['created']),
|
||||
'ago' => $item['app'] ? L10n::t('%s from %s', $ago, $item['app']) : $ago,
|
||||
'app' => $item['app'],
|
||||
'created' => Temporal::getRelativeDate($item['created']),
|
||||
'lock' => $lock,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue