From d026adfe0ba3f97f009976ce80203dfcb037d14a Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 2 Dec 2009 16:54:25 +0000 Subject: Changed avatar size to small in search results. Fixed a bug so comment owners' avatars show up instead of commented entity's owners' avatars. git-svn-id: http://code.elgg.org/elgg/trunk@3714 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/search/views/default/search/comments/listing.php | 8 ++++---- mod/search/views/default/search/listing.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'mod') diff --git a/mod/search/views/default/search/comments/listing.php b/mod/search/views/default/search/comments/listing.php index 943b65d76..55f8fed60 100644 --- a/mod/search/views/default/search/comments/listing.php +++ b/mod/search/views/default/search/comments/listing.php @@ -55,10 +55,10 @@ echo $nav; $body = elgg_view_title($title_str); foreach ($vars['entities'] as $entity) { - if ($owner = $entity->getOwnerEntity()) { - $icon = elgg_view('profile/icon', array('entity' => $owner)); - } elseif ($entity instanceof ElggUser) { - $icon = elgg_view('profile/icon', array('entity' => $entity)); + $owner = get_entity($entity->getVolatileData('search_matched_comment_owner_guid')); + + if ($owner instanceof ElggUser) { + $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'small')); } else { $icon = ''; } diff --git a/mod/search/views/default/search/listing.php b/mod/search/views/default/search/listing.php index b2ce79924..a747f43e5 100644 --- a/mod/search/views/default/search/listing.php +++ b/mod/search/views/default/search/listing.php @@ -98,9 +98,9 @@ $body = elgg_view_title($type_str); foreach ($entities as $entity) { if ($owner = $entity->getOwnerEntity()) { - $icon = elgg_view('profile/icon', array('entity' => $owner)); + $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'small')); } elseif ($entity instanceof ElggUser) { - $icon = elgg_view('profile/icon', array('entity' => $entity)); + $icon = elgg_view('profile/icon', array('entity' => $entity, 'size' => 'small')); } else { $icon = ''; } -- cgit v1.2.3