diff options
Diffstat (limited to 'mod/bookmarks/pages/owner.php')
-rw-r--r-- | mod/bookmarks/pages/owner.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mod/bookmarks/pages/owner.php b/mod/bookmarks/pages/owner.php index 2216b593f..c11d6628e 100644 --- a/mod/bookmarks/pages/owner.php +++ b/mod/bookmarks/pages/owner.php @@ -5,11 +5,10 @@ * @package Bookmarks */ +$guid = get_input('guid'); + +elgg_set_page_owner_guid($guid); $page_owner = elgg_get_page_owner_entity(); -if (!$page_owner) { - $page_owner = elgg_get_logged_in_user_guid(); - elgg_set_page_owner_guid($page_owner); -} elgg_push_breadcrumb($page_owner->name); @@ -17,17 +16,26 @@ $offset = (int)get_input('offset', 0); $content .= elgg_list_entities(array( 'type' => 'object', 'subtype' => 'bookmarks', - 'owner_guid' => $page_owner->guid, + 'container_guid' => $page_owner->guid, 'limit' => 10, 'offset' => $offset, 'full_view' => false, 'view_toggle_type' => false )); +if (!$content) { + $content = elgg_echo('bookmarks:none'); +} + $title = elgg_echo('bookmarks:owner', array($page_owner->name)); +$filter_context = ''; +if ($page_owner->getGUID() == elgg_get_logged_in_user_guid()) { + $filter_context = 'mine'; +} + $body = elgg_view_layout('content', array( - 'filter_context' => 'mine', + 'filter_context' => $filter_context, 'content' => $content, 'title' => $title )); |