From 8d23a8da8dd7326d6ce9c3a64f96e5325a09d4a1 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 20 Sep 2014 16:21:49 -0700 Subject: fix empty likes --- include/conversation.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/conversation.php b/include/conversation.php index 05ae72d61..a4d94f946 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -989,7 +989,11 @@ function like_puller($a,$item,&$arr,$mode) { $verb = (($mode === 'like') ? ACTIVITY_LIKE : ACTIVITY_DISLIKE); if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) { - $url = chanlink_url($item['author']['xchan_url']); + + if($item['author']['xchan_url']) + $url = chanlink_url($item['author']['xchan_url']); + else + $url = z_root(); if(! $item['thr_parent']) $item['thr_parent'] = $item['parent_mid']; @@ -1000,7 +1004,10 @@ function like_puller($a,$item,&$arr,$mode) { $arr[$item['thr_parent']] = 1; else $arr[$item['thr_parent']] ++; - $arr[$item['thr_parent'] . '-l'][] = '' . $item['author']['xchan_name'] . ''; + + $name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown')); + + $arr[$item['thr_parent'] . '-l'][] = '' . $name . ''; } return; } -- cgit v1.2.3