diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-17 03:52:00 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-17 03:52:00 +0000 |
commit | 52c1eea1c0dd1f73c7d21d91198c418b47cbcec5 (patch) | |
tree | 28b717bbfdac9e91531daf05d93a9b49e435a25a /mod/bookmarks/pages/owner.php | |
parent | 5a9dfa444ec1807b7b73b9e86fe219a0055731c3 (diff) | |
download | elgg-52c1eea1c0dd1f73c7d21d91198c418b47cbcec5.tar.gz elgg-52c1eea1c0dd1f73c7d21d91198c418b47cbcec5.tar.bz2 |
Fixes #2680: Added group support to bookmarks plugin.
git-svn-id: http://code.elgg.org/elgg/trunk@8269 36083f99-b078-4883-b0ff-0f9b5a30f544
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 )); |