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.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/pages/friends/index.php b/pages/friends/index.php
new file mode 100644
index 000000000..63518a413
--- /dev/null
+++ b/pages/friends/index.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Elgg friends page
+ *
+ * @package Elgg.Core
+ * @subpackage Social.Friends
+ */
+
+$owner = elgg_get_page_owner_entity();
+if (!$owner) {
+ // unknown user so send away (@todo some sort of 404 error)
+ forward();
+}
+
+$title = elgg_echo("friends:owned", array($owner->name));
+
+$options = array(
+ 'relationship' => 'friend',
+ 'relationship_guid' => $owner->getGUID(),
+ 'inverse_relationship' => FALSE,
+ 'type' => 'user',
+ 'full_view' => FALSE
+);
+$content = elgg_list_entities_from_relationship($options);
+if (!$content) {
+ $content = elgg_echo('friends:none');
+}
+
+$params = array(
+ 'content' => $content,
+ 'title' => $title,
+);
+$body = elgg_view_layout('one_sidebar', $params);
+
+echo elgg_view_page($title, $body);