From 46fdfa767062fa42c6ec3dfc6f985afc5ccee08b Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Thu, 2 Jul 2009 11:37:05 +0000 Subject: sorting friends list and going beyond 10 --- views/default/tidypics/tagging.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'views/default') diff --git a/views/default/tidypics/tagging.php b/views/default/tidypics/tagging.php index eb5f7e208..513845e32 100644 --- a/views/default/tidypics/tagging.php +++ b/views/default/tidypics/tagging.php @@ -30,7 +30,14 @@ getGUID(), false, 'user', '', 0); + $friends = get_entities_from_relationship('friend', $viewer->getGUID(), false, 'user', '', 0, 'time_created desc', 1000); + + if ($friends) { + foreach($friends as $friend) { + $friend_array[$friend->name] = $friend->getGUID(); + } + } + ksort($friend_array); $content = ""; $content .= ""; @@ -41,8 +48,8 @@ $content .= "
  • {$viewer->name} (" . elgg_echo('me') . ")
  • "; if ($friends) { - foreach($friends as $friend) { - $content .= "
  • {$friend->name}
  • "; + foreach($friend_array as $friend_name => $friend_guid) { + $content .= "
  • {$friend_name}
  • "; } } } -- cgit v1.2.3