diff options
author | friendica <info@friendica.com> | 2014-09-20 16:21:49 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-09-20 16:21:49 -0700 |
commit | 8d23a8da8dd7326d6ce9c3a64f96e5325a09d4a1 (patch) | |
tree | b1c01f052eaef705e3f776cd3c4699ab40fb9d1b | |
parent | 1c564428182ea25892896109f6d8ec3f2a98b045 (diff) | |
download | volse-hubzilla-8d23a8da8dd7326d6ce9c3a64f96e5325a09d4a1.tar.gz volse-hubzilla-8d23a8da8dd7326d6ce9c3a64f96e5325a09d4a1.tar.bz2 volse-hubzilla-8d23a8da8dd7326d6ce9c3a64f96e5325a09d4a1.zip |
fix empty likes
-rw-r--r-- | include/conversation.php | 11 | ||||
-rw-r--r-- | version.inc | 2 |
2 files changed, 10 insertions, 3 deletions
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'][] = '<a href="'. $url . '">' . $item['author']['xchan_name'] . '</a>'; + + $name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown')); + + $arr[$item['thr_parent'] . '-l'][] = '<a href="'. $url . '">' . $name . '</a>'; } return; } diff --git a/version.inc b/version.inc index 61b92795e..5a8480353 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-09-19.803 +2014-09-20.804 |