aboutsummaryrefslogtreecommitdiff
path: root/mod/bookmarks/pages
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-20 22:25:37 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-20 22:25:37 +0000
commit8dca382032b814a6670a227080c0f662fe1d2255 (patch)
treedca25f581929ab09428395c8ec72322f266d2995 /mod/bookmarks/pages
parenteda716aaf2f50d58f487209c9ea1dd9ddbea74c1 (diff)
downloadelgg-8dca382032b814a6670a227080c0f662fe1d2255.tar.gz
elgg-8dca382032b814a6670a227080c0f662fe1d2255.tar.bz2
Refs #2970 updated blog and bookmarks plugins
git-svn-id: http://code.elgg.org/elgg/trunk@8373 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/bookmarks/pages')
-rw-r--r--mod/bookmarks/pages/add.php13
-rw-r--r--mod/bookmarks/pages/all.php6
-rw-r--r--mod/bookmarks/pages/edit.php6
-rw-r--r--mod/bookmarks/pages/friends.php2
-rw-r--r--mod/bookmarks/pages/owner.php3
-rw-r--r--mod/bookmarks/pages/view.php11
6 files changed, 8 insertions, 33 deletions
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;