aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/friends
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/widgets/friends')
-rw-r--r--views/default/widgets/friends/content.php22
1 files changed, 7 insertions, 15 deletions
diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php
index f20f00194..7e3584b1e 100644
--- a/views/default/widgets/friends/content.php
+++ b/views/default/widgets/friends/content.php
@@ -18,20 +18,12 @@ $num = (int) $vars['entity']->num_display;
// get the correct size
$size = $vars['entity']->icon_size;
-// Get the user's friends
-if ($owner) {
- $friends = $owner->getFriends("", $num);
-}
-// If there are any friends to view, view them
-if (is_array($friends) && sizeof($friends) > 0) {
-
- echo "<div id=\"widget_friends_list\">";
-
- foreach($friends as $friend) {
- echo "<div class=\"widget_friends_singlefriend\" >";
- echo elgg_view_entity_icon(get_user($friend->guid), $size);
- echo "</div>";
- }
+$html = $owner->listFriends('', $num, array(
+ 'size' => $size,
+ 'gallery' => true,
+));
+if ($html) {
+ echo $html;
+} else {
- echo "</div>";
}