loop detection
This commit is contained in:
parent
62a60e5542
commit
1b9722c65a
@ -3335,7 +3335,6 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
|
|||||||
if((! $private) && $new_public_policy)
|
if((! $private) && $new_public_policy)
|
||||||
$private = 1;
|
$private = 1;
|
||||||
|
|
||||||
|
|
||||||
$item_wall = 1;
|
$item_wall = 1;
|
||||||
$item_origin = 1;
|
$item_origin = 1;
|
||||||
$item_uplink = 0;
|
$item_uplink = 0;
|
||||||
@ -3386,8 +3385,13 @@ function start_delivery_chain($channel, $item, $item_id, $parent) {
|
|||||||
|
|
||||||
if($r)
|
if($r)
|
||||||
proc_run('php','include/notifier.php','tgroup',$item_id);
|
proc_run('php','include/notifier.php','tgroup',$item_id);
|
||||||
else
|
else {
|
||||||
logger('start_delivery_chain: failed to update item');
|
logger('start_delivery_chain: failed to update item');
|
||||||
|
// reset the source xchan to prevent loops
|
||||||
|
$r = q("update item set source_xchan = '' where id = %d",
|
||||||
|
intval($item_id)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -378,10 +378,13 @@ function notifier_run($argv, $argc){
|
|||||||
// if our parent is a tag_delivery recipient, uplink to the original author causing
|
// if our parent is a tag_delivery recipient, uplink to the original author causing
|
||||||
// a delivery fork.
|
// a delivery fork.
|
||||||
|
|
||||||
if(intval($parent_item['item_uplink']) && (! $top_level_post) && ($cmd !== 'uplink')) {
|
if(($parent_item) && intval($parent_item['item_uplink']) && (! $top_level_post) && ($cmd !== 'uplink')) {
|
||||||
|
// don't uplink a relayed post to the relay owner
|
||||||
|
if($parent_item['source_xchan'] !== $parent_item['owner_xchan']) {
|
||||||
logger('notifier: uplinking this item');
|
logger('notifier: uplinking this item');
|
||||||
proc_run('php','include/notifier.php','uplink',$item_id);
|
proc_run('php','include/notifier.php','uplink',$item_id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$private = false;
|
$private = false;
|
||||||
$recipients = collect_recipients($parent_item,$private);
|
$recipients = collect_recipients($parent_item,$private);
|
||||||
|
Reference in New Issue
Block a user