From 1434130264836916001fe191dd237e51af5c6e3e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 24 Feb 2015 20:21:21 -0800 Subject: don't send deleted items upstream - only downstream. --- include/notifier.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/notifier.php b/include/notifier.php index fe6ac33c0..c77857087 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -315,9 +315,12 @@ function notifier_run($argv, $argc){ $r = fetch_post_tags($r); $target_item = $r[0]; + $deleted_item = false; - if($target_item['item_restrict'] & ITEM_DELETED) + if($target_item['item_restrict'] & ITEM_DELETED) { logger('notifier: target item ITEM_DELETED', LOGGER_DEBUG); + $deleted_item = true; + } $unforwardable = ITEM_UNPUBLISHED|ITEM_DELAYED_PUBLISH|ITEM_WEBPAGE|ITEM_BUILDBLOCK|ITEM_PDL; if($target_item['item_restrict'] & $unforwardable) { @@ -376,7 +379,7 @@ function notifier_run($argv, $argc){ // tag_deliver'd post which needs to be sent back to the original author - if(($cmd === 'uplink') && ($parent_item['item_flags'] & ITEM_UPLINK) && (! $top_level_post)) { + if(($cmd === 'uplink') && ($parent_item['item_flags'] & ITEM_UPLINK) && (! $top_level_post) && (! $deleted_item)) { logger('notifier: uplink'); $uplink = true; } @@ -397,7 +400,7 @@ function notifier_run($argv, $argc){ // if our parent is a tag_delivery recipient, uplink to the original author causing // a delivery fork. - if(($parent_item['item_flags'] & ITEM_UPLINK) && (! $top_level_post) && ($cmd !== 'uplink')) { + if(($parent_item['item_flags'] & ITEM_UPLINK) && (! $top_level_post) && ($cmd !== 'uplink') && (! $deleted_item)) { logger('notifier: uplinking this item'); proc_run('php','include/notifier.php','uplink',$item_id); } -- cgit v1.2.3