From 4e08ff9149c717f18ee7285b0508e8a1fc50503b Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 19 Jun 2008 10:47:54 +0000 Subject: The friends pages now use listing functions; also fixed a minor bug in the get_entities_from_relationship function. git-svn-id: https://code.elgg.org/elgg/trunk@990 36083f99-b078-4883-b0ff-0f9b5a30f544 --- friends/of.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'friends/of.php') diff --git a/friends/of.php b/friends/of.php index 7886c6c14..68aa47778 100644 --- a/friends/of.php +++ b/friends/of.php @@ -13,24 +13,12 @@ if (!$owner = page_owner_entity()) { gatekeeper(); + set_page_owner($_SESSION['user']->getGUID()); $owner = $_SESSION['user']; } - $offset = (int) get_input('offset'); - - if ($friends = $owner->getFriendsOf("",50,$offset)) { - - $body = elgg_view("friends/list",array('friends' => $friends)); - - } else { - - if (page_owner() != $_SESSION['guid']) { - $body = elgg_echo("friends:of:none"); - } else { - $body = elgg_echo("friends:of:none:you"); - } - - } + $area1 = list_entities_from_relationship('friend',$owner->getGUID(),true,'user',''); + $body = elgg_view_layout('one_column',$area1); echo page_draw(sprintf(elgg_echo("friends:of:owned"),$owner->name),$body); -- cgit v1.2.3