aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/friends/content.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:21:44 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:21:44 +0000
commit210b27ec56ce6f5fffc14c89270865932638c779 (patch)
treecbf27ca702a0661506747a064d30570dace3cea1 /views/default/widgets/friends/content.php
parent99175d2417bc5d3657cc3e548affe21eda76f648 (diff)
downloadelgg-210b27ec56ce6f5fffc14c89270865932638c779.tar.gz
elgg-210b27ec56ce6f5fffc14c89270865932638c779.tar.bz2
Fixes #3045 custom index and the friends widget now use the gallery view for user icons
git-svn-id: http://code.elgg.org/elgg/trunk@8677 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/widgets/friends/content.php')
-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>";
}