aboutsummaryrefslogtreecommitdiff
path: root/views/default/tidypics
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-07-02 11:37:05 +0000
committerCash Costello <cash.costello@gmail.com>2009-07-02 11:37:05 +0000
commit46fdfa767062fa42c6ec3dfc6f985afc5ccee08b (patch)
tree62bbf6f1b37577d874bdfb1ae216424f3a02c0d3 /views/default/tidypics
parent16c6cb9372e5d7697c4d566d3ad3689c7f44807b (diff)
downloadelgg-46fdfa767062fa42c6ec3dfc6f985afc5ccee08b.tar.gz
elgg-46fdfa767062fa42c6ec3dfc6f985afc5ccee08b.tar.bz2
sorting friends list and going beyond 10
Diffstat (limited to 'views/default/tidypics')
-rw-r--r--views/default/tidypics/tagging.php13
1 files changed, 10 insertions, 3 deletions
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 @@
<?php
if($viewer) {
- $friends = get_entities_from_relationship('friend', $viewer->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 = "<input type='hidden' name='image_guid' value='{$file_guid}' />";
$content .= "<input type='hidden' name='coordinates' id='coordinates' value='' />";
@@ -41,8 +48,8 @@
$content .= "<li><a href='javascript:void(0)' onclick='selectUser({$viewer->getGUID()},\"{$viewer->name}\")'> {$viewer->name} (" . elgg_echo('me') . ")</a></li>";
if ($friends) {
- foreach($friends as $friend) {
- $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$friend->getGUID()}, \"{$friend->name}\")'>{$friend->name}</a></li>";
+ foreach($friend_array as $friend_name => $friend_guid) {
+ $content .= "<li><a href='javascript:void(0)' onclick='selectUser({$friend_guid}, \"{$friend_name}\")'>{$friend_name}</a></li>";
}
}
}