diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/dreport.php | 43 | ||||
-rw-r--r-- | mod/item.php | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/mod/dreport.php b/mod/dreport.php new file mode 100644 index 000000000..a20e17372 --- /dev/null +++ b/mod/dreport.php @@ -0,0 +1,43 @@ +<?php + +function dreport_content(&$a) { + + if(! local_channel()) { + notice( t('Permission denied') . EOL); + return; + } + + $channel = $a->get_channel(); + + $mid = ((argc() > 1) ? argv(1) : ''); + + if(! $mid) { + notice( t('Invalid message') . EOL); + return; + } + + $r = q("select * from dreport where dreport_xchan = '%s' and dreport_mid = '%s'", + dbesc($channel['channel_hash']), + dbesc($mid) + ); + + if(! $r) { + notice( t('no results') . EOL); + return; + } + + + $o .= '<h2>' . sprintf( t('Delivery report for %1$s'),substr($mid,0,32)) . '...' . '</h2>'; + $o .= '<table>'; + + foreach($r as $rr) { + $name = escape_tags(substr($rr['dreport_recip'],strpos($rr['dreport_recip'],' '))); + $o .= '<tr><td>' . $name . '</td><td>' . escape_tags($rr['dreport_result']) . '</td><td>' . escape_tags($rr['dreport_time']) . '</td></tr>'; + } + $o .= '</table>'; + + return $o; + + + +}
\ No newline at end of file diff --git a/mod/item.php b/mod/item.php index d0cf59091..93f24bd1a 100644 --- a/mod/item.php +++ b/mod/item.php @@ -641,6 +641,7 @@ function item_post(&$a) { $item_unseen = ((local_channel() != $profile_uid) ? 1 : 0); $item_wall = (($post_type === 'wall' || $post_type === 'wall-comment') ? 1 : 0); $item_origin = (($origin) ? 1 : 0); + $item_consensus = (($consensus) ? 1 : 0); // determine if this is a wall post |