aboutsummaryrefslogtreecommitdiff
path: root/pages/friends/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/friends/index.php')
-rw-r--r--pages/friends/index.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/pages/friends/index.php b/pages/friends/index.php
index 13799e973..a8e5f7e8e 100644
--- a/pages/friends/index.php
+++ b/pages/friends/index.php
@@ -8,15 +8,12 @@
$owner = elgg_get_page_owner();
if (!$owner) {
- gatekeeper();
- set_page_owner(get_loggedin_userid());
- $owner = elgg_get_page_owner();
+ // unknown user so send away (@todo some sort of 404 error)
+ forward();
}
$title = elgg_echo("friends:owned", array($owner->name));
-$content = elgg_view_title($title);
-
$options = array(
'relationship' => 'friend',
'relationship_guid' => $owner->getGUID(),
@@ -24,8 +21,12 @@ $options = array(
'type' => 'user',
'full_view' => FALSE
);
-$content .= elgg_list_entities_from_relationship($options);
+$content = elgg_list_entities_from_relationship($options);
-$body = elgg_view_layout('one_column_with_sidebar', array('content' => $content));
+$params = array(
+ 'content' => $content,
+ 'title' => $title,
+);
+$body = elgg_view_layout('one_sidebar', $params);
echo elgg_view_page($title, $body);