diff options
author | cash <cash.costello@gmail.com> | 2013-07-05 20:44:02 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2013-07-05 20:44:02 -0400 |
commit | 597323ce5dece2597accbf98d55c2d2fa6891f4f (patch) | |
tree | a2c83c233c14633e194d8981323530d3691dcf6b /mod/search/views/default | |
parent | a873fa6429460ccebbfdb5b7d17f124c80a6ee5c (diff) | |
download | elgg-597323ce5dece2597accbf98d55c2d2fa6891f4f.tar.gz elgg-597323ce5dece2597accbf98d55c2d2fa6891f4f.tar.bz2 |
Fixes #5708 search supports multiple comments on the same entity
Diffstat (limited to 'mod/search/views/default')
-rw-r--r-- | mod/search/views/default/search/comments/entity.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mod/search/views/default/search/comments/entity.php b/mod/search/views/default/search/comments/entity.php index 005bb270c..77e950843 100644 --- a/mod/search/views/default/search/comments/entity.php +++ b/mod/search/views/default/search/comments/entity.php @@ -6,8 +6,11 @@ */ $entity = $vars['entity']; +$comments_data = $entity->getVolatileData('search_comments_data'); +$comment_data = array_shift($comments_data); +$entity->setVolatileData('search_comments_data', $comments_data); -$owner = get_entity($entity->getVolatileData('search_matched_comment_owner_guid')); +$owner = get_entity($comment_data['owner_guid']); if ($owner instanceof ElggUser) { $icon = elgg_view_entity_icon($owner, 'tiny'); @@ -38,12 +41,12 @@ if ($entity->getVolatileData('search_unavailable_entity')) { $title = elgg_echo('search:comment_on', array($title)); // @todo this should use something like $comment->getURL() - $url = $entity->getURL() . '#comment_' . $entity->getVolatileData('search_match_annotation_id'); + $url = $entity->getURL() . '#comment_' . $comment_data['annotation_id']; $title = "<a href=\"$url\">$title</a>"; } -$description = $entity->getVolatileData('search_matched_comment'); -$tc = $entity->getVolatileData('search_matched_comment_time_created');; +$description = $comment_data['text']; +$tc = $comment_data['time_created']; $time = elgg_view_friendly_time($tc); $body = "<p class=\"mbn\">$title</p>$description"; |