From 0ef2622621867fa197988974b47eff85f20a80e7 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 13 Jun 2016 22:09:22 -0700 Subject: some work to provide propagation and honouring of the item_notshown flag. --- include/items.php | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index 913ff1573..a844cd1f6 100755 --- a/include/items.php +++ b/include/items.php @@ -677,13 +677,23 @@ function get_item_elements($x,$allow_code = false) { $arr['item_flags'] = 0; - if(array_key_exists('flags',$x) && in_array('consensus',$x['flags'])) - $arr['item_consensus'] = 1; + if(array_key_exists('flags',$x)) { - if(array_key_exists('flags',$x) && in_array('deleted',$x['flags'])) - $arr['item_deleted'] = 1; - if(array_key_exists('flags',$x) && in_array('hidden',$x['flags'])) - $arr['item_hidden'] = 1; + if(in_array('consensus',$x['flags'])) + $arr['item_consensus'] = 1; + + if(in_array('deleted',$x['flags'])) + $arr['item_deleted'] = 1; + + if(in_array('notshown',$x['flags'])) + $arr['item_notshown'] = 1; + + // hidden item are no longer propagated - notshown may be a suitable alternative + + if(in_array('hidden',$x['flags'])) + $arr['item_hidden'] = 1; + + } // Here's the deal - the site might be down or whatever but if there's a new person you've never // seen before sending stuff to your stream, we MUST be able to look them up and import their data from their @@ -1339,6 +1349,8 @@ function encode_item_flags($item) { $ret[] = 'deleted'; if(intval($item['item_hidden'])) $ret[] = 'hidden'; + if(intval($item['item_notshown'])) + $ret[] = 'notshown'; if(intval($item['item_thread_top'])) $ret[] = 'thread_parent'; if(intval($item['item_nsfw'])) -- cgit v1.2.3