Reliably show posts from contact

This commit is contained in:
Michael 2017-09-28 06:01:31 +00:00
commit 98a3e012f8
3 changed files with 14 additions and 4 deletions

View file

@ -96,12 +96,12 @@ class Item extends BaseObject {
$item = $this->get_data();
$edited = false;
// If the time between "created" and "editet" differes we add
// a notices that the post was editet.
// If the time between "created" and "edited" differs we add
// a notice that the post was edited.
// Note: In some networks reshared items seem to have (sometimes) a difference
// between creation time and edit time of a second. Thats why we add the notice
// only if the difference is more than 1 second.
if (abs(strtotime($item['created']) - strtotime($item['edited'])) > 1) {
if (strtotime($item['edited']) - strtotime($item['created']) > 1) {
$edited = array(
'label' => t('This entry was edited'),
'date' => datetime_convert('UTC', date_default_timezone_get(), $item['edited'], 'r'),