From 02a36948685737afdbbb9a292a338b304bb5cc04 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 Aug 2013 19:51:58 -0700 Subject: fix superblock for comments --- include/ItemObject.php | 4 ++-- include/conversation.php | 14 ++++++++++++++ version.inc | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/include/ItemObject.php b/include/ItemObject.php index 8c8c0ee2a..22b191e79 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -39,10 +39,10 @@ class Item extends BaseObject { foreach($data['children'] as $item) { /* - * Only add thos that will be displayed + * Only add those that will be displayed */ - if(! visible_activity($item)) { + if((! visible_activity($item)) || array_key_exists('author_blocked',$item)) { continue; } diff --git a/include/conversation.php b/include/conversation.php index aade06b8a..9dab5931b 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -712,6 +712,8 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { $threads = array(); foreach($items as $item) { + // Check for any blocked authors + if($arr_blocked) { $blocked = false; foreach($arr_blocked as $b) { @@ -724,6 +726,18 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') { continue; } + // Check all the kids too + + if($arr_blocked && $item['children']) { + for($d = 0; $d < count($item['children']); $d ++) { + foreach($arr_blocked as $b) { + if(($b) && ($item['children'][$d]['author_xchan'] == $b)) + $item['children'][$d]['author_blocked'] = true; + } + } + } + + // Can we put this after the visibility check? like_puller($a,$item,$alike,'like'); diff --git a/version.inc b/version.inc index 717abe607..6ca230997 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2013-08-19.410 +2013-08-20.411 -- cgit v1.2.3