aboutsummaryrefslogtreecommitdiffstats
path: root/include/ItemObject.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-23 14:16:14 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-23 14:16:14 +0100
commit7338649fa54a109122deecc743079eab6b9c1251 (patch)
treefcce0bb728f3d7204201ee7f5f182a57cfd5d2c6 /include/ItemObject.php
parente60f527cb09dacf7b81af37a15c890c6dfbe1bb0 (diff)
parentae1103c5a3f3f76a0269cbb5de11a7cb96496ad3 (diff)
downloadvolse-hubzilla-7338649fa54a109122deecc743079eab6b9c1251.tar.gz
volse-hubzilla-7338649fa54a109122deecc743079eab6b9c1251.tar.bz2
volse-hubzilla-7338649fa54a109122deecc743079eab6b9c1251.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/ItemObject.php')
-rw-r--r--include/ItemObject.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/ItemObject.php b/include/ItemObject.php
index 34500efb9..512e12838 100644
--- a/include/ItemObject.php
+++ b/include/ItemObject.php
@@ -258,6 +258,15 @@ class Item extends BaseObject {
if ($shareable)
$share = array( t('Share This'), t('share'));
+ $dreport = '';
+
+ $keep_reports = intval(get_config('system','expire_delivery_reports'));
+ if($keep_reports === 0)
+ $keep_reports = 30;
+
+ if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0)
+ $dreport = t('Delivery Report');
+
if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
$indent .= ' shiny';
@@ -277,6 +286,10 @@ class Item extends BaseObject {
$comment_count_txt = sprintf( tt('%d comment','%d comments',$total_children),$total_children );
$list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : '');
+
+
+
+
$children = $this->get_children();
$has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false);
@@ -309,7 +322,7 @@ class Item extends BaseObject {
'vwall' => t('via Wall-To-Wall:'),
'profile_url' => $profile_link,
'item_photo_menu' => item_photo_menu($item),
- 'dreport' => t('Delivery Report'),
+ 'dreport' => $dreport,
'name' => $profile_name,
'thumb' => $profile_avatar,
'osparkle' => $osparkle,