aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-08-24 17:05:18 +0100
committerThomas Willingham <founder@kakste.com>2013-08-24 17:05:18 +0100
commitc803fb90df3bbbd8bb88df09a271b5a9214e8c1d (patch)
tree0ad021580411798fc0ab025f1b1c302fe8afd3f6 /include/conversation.php
parent6999fb586ba90e9f1c79e9f09f4035f63fb925fd (diff)
parentb0dd38b30949f907265eda757bfa14aa1f38b38f (diff)
downloadvolse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.gz
volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.bz2
volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 6d551a5c9..6e6ffef94 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -137,7 +137,7 @@ function localize_item(&$item){
case ACTIVITY_OBJ_NOTE:
default:
$post_type = t('status');
- if($obj['id'] != $item['mid'])
+ if($obj['mid'] != $obj['parent_mid'])
$post_type = t('comment');
break;
}
@@ -162,6 +162,9 @@ function localize_item(&$item){
$item['body'] .= "\n\n\n" . '[zrl=' . chanlink_url($author_link) . '][zmg=80x80]' . $Bphoto . '[/zmg][/zrl]';
}
+ else {
+ logger('localize_item like failed: link ' . $author_link . ' name ' . $author_name . ' url ' . $item_url);
+ }
}
@@ -712,6 +715,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 +729,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');