aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-23 04:44:48 -0700
committerfriendica <info@friendica.com>2012-06-23 04:44:48 -0700
commit7614d35cadb274a48434a61cdab205ca120462a3 (patch)
treec48f141ebc4a9b63cff6181eb942927836fc721a /include
parentbf47bf5ba015a844919362a56903eb82c064bee9 (diff)
downloadvolse-hubzilla-7614d35cadb274a48434a61cdab205ca120462a3.tar.gz
volse-hubzilla-7614d35cadb274a48434a61cdab205ca120462a3.tar.bz2
volse-hubzilla-7614d35cadb274a48434a61cdab205ca120462a3.zip
liking comments backend
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 2244e8df7..d0ced1d18 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -659,8 +659,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
else
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb));
- $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
- $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
+ $like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
+ $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
call_hooks('render_location',$locate);
@@ -876,13 +876,17 @@ function like_puller($a,$item,&$arr,$mode) {
}
else
$url = zrl($url);
- if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
- $arr[$item['parent'] . '-l'] = array();
- if(! isset($arr[$item['parent']]))
- $arr[$item['parent']] = 1;
+
+ if(! $item['thr-parent'])
+ $item['thr-parent'] = $item['parent-uri'];
+
+ if(! ((isset($arr[$item['thr-parent'] . '-l'])) && (is_array($arr[$item['thr-parent'] . '-l']))))
+ $arr[$item['thr-parent'] . '-l'] = array();
+ if(! isset($arr[$item['thr-parent']]))
+ $arr[$item['thr-parent']] = 1;
else
- $arr[$item['parent']] ++;
- $arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
+ $arr[$item['thr-parent']] ++;
+ $arr[$item['thr-parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
}
return;
}}