diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/blog/lib/blog.php | 6 | ||||
-rw-r--r-- | mod/bookmarks/pages/add.php | 13 | ||||
-rw-r--r-- | mod/bookmarks/pages/all.php | 6 | ||||
-rw-r--r-- | mod/bookmarks/pages/edit.php | 6 | ||||
-rw-r--r-- | mod/bookmarks/pages/friends.php | 2 | ||||
-rw-r--r-- | mod/bookmarks/pages/owner.php | 3 | ||||
-rw-r--r-- | mod/bookmarks/pages/view.php | 11 | ||||
-rw-r--r-- | mod/bookmarks/start.php | 4 |
8 files changed, 9 insertions, 42 deletions
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php index aa9241d23..861f75f95 100644 --- a/mod/blog/lib/blog.php +++ b/mod/blog/lib/blog.php @@ -27,7 +27,6 @@ function blog_get_page_content_read($guid = NULL) { return $return; } - elgg_set_page_owner_guid($blog->getContainerGUID()); $return['title'] = htmlspecialchars($blog->title); $container = $blog->getContainerEntity(); @@ -75,7 +74,6 @@ function blog_get_page_content_list($container_guid = NULL) { } $return['title'] = elgg_echo('blog:title:user_blogs', array($container->name)); - elgg_set_page_owner_guid($container_guid); $crumbs_title = $container->name; elgg_push_breadcrumb($crumbs_title); @@ -133,7 +131,6 @@ function blog_get_page_content_list($container_guid = NULL) { */ function blog_get_page_content_friends($user_guid) { - elgg_set_page_owner_guid($user_guid); $user = get_user($user_guid); $return = array(); @@ -196,6 +193,7 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) { $now = time(); $user = get_user($owner_guid); + elgg_set_page_owner_guid($owner_guid); $crumbs_title = $user->name; elgg_push_breadcrumb($crumbs_title, "pg/blog/owner/{$user->username}"); @@ -286,7 +284,6 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) { if ($page == 'edit') { $blog = get_entity((int)$guid); - elgg_set_page_owner_guid($blog->getContainerGUID()); $title = elgg_echo('blog:edit'); @@ -325,7 +322,6 @@ function blog_get_page_content_edit($page, $guid = 0, $revision = NULL) { } else { $container = get_entity($guid); } - elgg_set_page_owner_guid($container->guid); elgg_push_breadcrumb(elgg_echo('blog:add')); $body_vars = blog_prepare_form_vars($blog); diff --git a/mod/bookmarks/pages/add.php b/mod/bookmarks/pages/add.php index c748daca5..c7fd3cf79 100644 --- a/mod/bookmarks/pages/add.php +++ b/mod/bookmarks/pages/add.php @@ -5,18 +5,7 @@ * @package Bookmarks */ -$bookmark_guid = get_input('guid'); -$bookmark = get_entity($bookmark_guid); -$container_guid = (int) get_input('container_guid'); -$container = get_entity($container_guid); - -// for groups. -$page_owner = $container; -if (elgg_instanceof($container, 'object')) { - $page_owner = $container->getContainerEntity(); -} - -elgg_set_page_owner_guid($page_owner->getGUID()); +$page_owner = elgg_get_page_owner_entity(); $title = elgg_echo('bookmarks:add'); elgg_push_breadcrumb($title); diff --git a/mod/bookmarks/pages/all.php b/mod/bookmarks/pages/all.php index 5a01b6f34..f31464aca 100644 --- a/mod/bookmarks/pages/all.php +++ b/mod/bookmarks/pages/all.php @@ -5,11 +5,7 @@ * @package ElggBookmarks */ -$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_set_page_owner_guid(elgg_get_logged_in_user_guid()); $offset = (int)get_input('offset', 0); $content .= elgg_list_entities(array( diff --git a/mod/bookmarks/pages/edit.php b/mod/bookmarks/pages/edit.php index 7b055e699..24513a960 100644 --- a/mod/bookmarks/pages/edit.php +++ b/mod/bookmarks/pages/edit.php @@ -7,17 +7,13 @@ $bookmark_guid = get_input('guid'); $bookmark = get_entity($bookmark_guid); -$container_guid = (int) get_input('container_guid'); -$container = get_entity($container_guid); if (!elgg_instanceof($bookmark, 'object', 'bookmarks') || !$bookmark->canEdit()) { register_error(elgg_echo('bookmarks:unknown_bookmark')); forward(REFERRER); } -// for groups. -$container = $bookmark->getContainerEntity(); -elgg_set_page_owner_guid($container->getGUID()); +$page_owner = elgg_get_page_owner_entity(); $title = elgg_echo('bookmarks:edit'); elgg_push_breadcrumb($title); diff --git a/mod/bookmarks/pages/friends.php b/mod/bookmarks/pages/friends.php index 3c55317eb..dedeeb5e9 100644 --- a/mod/bookmarks/pages/friends.php +++ b/mod/bookmarks/pages/friends.php @@ -4,9 +4,7 @@ * * @package ElggBookmarks */ -$guid = get_input('guid'); -elgg_set_page_owner_guid($guid); $owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb($owner->name, "pg/bookmarks/owner/$owner->username"); diff --git a/mod/bookmarks/pages/owner.php b/mod/bookmarks/pages/owner.php index 72843f9f0..d1564f751 100644 --- a/mod/bookmarks/pages/owner.php +++ b/mod/bookmarks/pages/owner.php @@ -5,9 +5,6 @@ * @package Bookmarks */ -$guid = get_input('guid'); - -elgg_set_page_owner_guid($guid); $page_owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb($page_owner->name); diff --git a/mod/bookmarks/pages/view.php b/mod/bookmarks/pages/view.php index 131a0b52b..b5a857857 100644 --- a/mod/bookmarks/pages/view.php +++ b/mod/bookmarks/pages/view.php @@ -7,15 +7,14 @@ $bookmark = get_entity(get_input('guid')); -elgg_set_page_owner_guid($bookmark->getContainerGUID()); -$owner = elgg_get_page_owner_entity(); +$page_owner = elgg_get_page_owner_entity(); -$crumbs_title = $owner->name; +$crumbs_title = $page_owner->name; -if (elgg_instanceof($owner, 'group')) { - elgg_push_breadcrumb($crumbs_title, "pg/bookmarks/group/$owner->guid/owner"); +if (elgg_instanceof($page_owner, 'group')) { + elgg_push_breadcrumb($crumbs_title, "pg/bookmarks/group/$page_owner->guid/owner"); } else { - elgg_push_breadcrumb($crumbs_title, "pg/bookmarks/owner/$owner->username"); + elgg_push_breadcrumb($crumbs_title, "pg/bookmarks/owner/$page_owner->username"); } $title = $bookmark->title; diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 31c414741..3585999b3 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -104,12 +104,10 @@ function bookmarks_page_handler($page) { break; case "owner": - set_input('username', $page[1]); include "$pages/owner.php"; break; case "friends": - set_input('username', $page[1]); include "$pages/friends.php"; break; @@ -121,7 +119,6 @@ function bookmarks_page_handler($page) { case "add": gatekeeper(); - set_input('container_guid', $page[1]); include "$pages/add.php"; break; @@ -133,7 +130,6 @@ function bookmarks_page_handler($page) { case 'group': group_gatekeeper(); - set_input('guid', $page[1]); include "$pages/owner.php"; break; |