diff options
author | Sem <sembrestels@riseup.net> | 2011-12-08 21:19:02 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2011-12-08 21:19:02 +0100 |
commit | ab09c2001bd9384c4e3c2964c5d1a39a0e91b013 (patch) | |
tree | 6289b43f110fee228b50118ee8e7b6beeb0b336a /start.php | |
parent | 5c4dc1474ae89437f52101039f1452c267c252a7 (diff) | |
download | elgg-ab09c2001bd9384c4e3c2964c5d1a39a0e91b013.tar.gz elgg-ab09c2001bd9384c4e3c2964c5d1a39a0e91b013.tar.bz2 |
Arranged page to see friend requests.
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -46,16 +46,35 @@ function friendrequest_page_handler($page){ forward("friendrequests"); } + gatekeeper(); + elgg_push_context('friends'); + + $title = elgg_echo('friendrequest'); + $page_owner = elgg_get_logged_in_user_entity(); + elgg_set_page_owner_guid($page_owner->guid); + + $requests = elgg_get_entities_from_relationship(array( + 'type' => 'user', + 'relationship' => 'friendrequest', + 'relationship_guid' => $page_owner->guid, + 'inverse_relationship' => true, + 'limit' => 0, + )); + $content = elgg_view('friendrequest/requests', array( + 'requests' => $requests, + )); + $params = array( - 'title' => elgg_echo('friendrequest'), + 'content' => $content, + 'title' => $title, 'filter' => '', ); - $body = elgg_view_layout('content', $params); - echo elgg_view_page($params['title'], $body); + echo elgg_view_page($title, $body); + return true; } |