From 5859f9dcf68c2ca6ad355c16e7fbf5080eea9e75 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 9 Feb 2012 18:09:28 -0800 Subject: [PATCH] add render_location hook to both sets of conversations --- include/conversation.php | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 9df7b20e93..35abb29ca5 100755 --- a/include/conversation.php +++ b/include/conversation.php @@ -262,7 +262,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { else $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); - $locate = array('location' => $item_location, 'coord' => $item['coord'], 'html' => ''); + $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => ''); call_hooks('render_location',$locate); $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate)); @@ -589,16 +589,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) { $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']) : ''); - $location = (($item['location']) ? '' . $item['location'] . '' : ''); - $coord = (($item['coord']) ? '' . $item['coord'] . '' : ''); - if($coord) { - if($location) - $location .= '
(' . $coord . ')'; - else - $location = '' . $coord . ''; - } + $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => ''); + call_hooks('render_location',$locate); + + $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate)); $indent = (($toplevelpost) ? '' : ' comment');