From: Cash Costello Date: Thu, 2 Jul 2009 11:37:05 +0000 (+0000) Subject: sorting friends list and going beyond 10 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=46fdfa767062fa42c6ec3dfc6f985afc5ccee08b;p=lorea%2Felgg.git sorting friends list and going beyond 10 --- 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}
  • "; } } }