aboutsummaryrefslogtreecommitdiff
path: root/friends/of.php
diff options
context:
space:
mode:
Diffstat (limited to 'friends/of.php')
-rw-r--r--friends/of.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/friends/of.php b/friends/of.php
index d3668d587..a64b9cb6e 100644
--- a/friends/of.php
+++ b/friends/of.php
@@ -8,16 +8,19 @@
* @link http://elgg.org/
*/
-if (!$owner = page_owner_entity()) {
+$owner = page_owner_entity();
+if (!$owner) {
gatekeeper();
- set_page_owner($_SESSION['user']->getGUID());
- $owner = $_SESSION['user'];
+ set_page_owner(get_loggedin_userid());
+ $owner = page_owner_entity();
}
-$friends_of = sprintf(elgg_echo("friends:of:owned"),$owner->name);
-$area1 = elgg_view_title($friends_of);
-$area2 = "<div class='members_list'>".list_entities_from_relationship('friend',$owner->getGUID(),true,'user','',0,10,false)."</div>";
-$body = elgg_view_layout('one_column_with_sidebar', $area1 . $area2);
+$title = sprintf(elgg_echo("friends:of:owned"), $owner->name);
-page_draw($friends_of, $body);
+$content = elgg_view_title($title);
+$content .= "<div class='members_list'>" . list_entities_from_relationship('friend', $owner->getGUID(), TRUE, 'user', '', 0, 10, FALSE) . "</div>";
+
+$body = elgg_view_layout('one_column_with_sidebar', $content);
+
+page_draw($title, $body);