From c44acb35757700e52db5cc4a7093b8e4624dc3fa Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 3 Oct 2016 20:50:13 -0700 Subject: allow delivery report for not just the author, but also if you're the owner and it's on your wall. --- Zotlabs/Module/Dreport.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Module/Dreport.php') diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php index 3fdeff369..76e07b147 100644 --- a/Zotlabs/Module/Dreport.php +++ b/Zotlabs/Module/Dreport.php @@ -21,10 +21,11 @@ class Dreport extends \Zotlabs\Web\Controller { $table = 'push'; $mid = ((argc() > 2) ? argv(2) : ''); if($mid) { - $i = q("select id from item where mid = '%s' and author_xchan = '%s' and uid = %d", + $i = q("select id from item where mid = '%s' and uid = %d and ( author_xchan = '%s' or ( owner_xchan = '%s' and item_wall = 1 )) ", dbesc($mid), + intval($channel['channel_id']), dbesc($channel['channel_hash']), - intval($channel['channel_id']) + dbesc($channel['channel_hash']) ); if($i) { \Zotlabs\Daemon\Master::Summon([ 'Notifier', 'edit_post', $i[0]['id'] ]); @@ -47,8 +48,9 @@ class Dreport extends \Zotlabs\Web\Controller { switch($table) { case 'item': - $i = q("select id from item where mid = '%s' and author_xchan = '%s' ", + $i = q("select id from item where mid = '%s' and ( author_xchan = '%s' or ( owner_xchan = '%s' and item_wall = 1 )) ", dbesc($mid), + dbesc($channel['channel_hash']), dbesc($channel['channel_hash']) ); break; -- cgit v1.2.3