aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/pages/friends.php
blob: 5c930434bc36cd20fa55f20c9a7e8360f882341e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
 * Elgg bookmarks plugin friends page
 *
 * @package ElggBookmarks
 */
$guid = get_input('guid');

elgg_set_page_owner_guid($guid);
$owner = elgg_get_page_owner_entity();

elgg_push_context('bookmarks');
elgg_push_breadcrumb(elgg_echo('bookmarks'), 'pg/bookmarks/all');
elgg_push_breadcrumb($owner->name, "pg/bookmarks/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));

$title = elgg_echo('bookmarks:friends');

$content = list_user_friends_objects($owner->guid, 'bookmarks', 10, false);
if (!$content) {
	$content = elgg_echo('bookmarks:none');
}

$params = array(
	'filter_context' => 'friends',
	'content' => $content,
	'title' => $title,
);

$body = elgg_view_layout('content', $params);

echo elgg_view_page($title, $body);
elgg_pop_context();