From 0cc190deb5ec0c9608255192c042f573fd834019 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 26 Jan 2011 12:43:28 +0000 Subject: changed elgg_get_page_owner() to elgg_get_page_owner_entity() to be more consistent git-svn-id: http://code.elgg.org/elgg/trunk@7943 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/views/default/blog/group_module.php | 2 +- mod/blog/views/default/blog/sidebar/archives.php | 2 +- mod/blog/views/default/blog/sidebar/tagcloud.php | 2 +- mod/blog/views/default/widgets/blog/content.php | 2 +- mod/bookmarks/bookmarklet.php | 2 +- mod/bookmarks/start.php | 6 +++--- mod/bookmarks/views/default/bookmarks/bookmarklet.php | 2 +- mod/bookmarks/views/default/bookmarks/form.php | 6 +++--- mod/bookmarks/views/default/bookmarks/group_bookmarks.php | 4 ++-- mod/bookmarks/views/default/widgets/bookmarks/view.php | 2 +- mod/defaultwidgets/views/default/defaultwidgets/editor.php | 2 +- mod/file/friends.php | 2 +- mod/file/index.php | 2 +- mod/file/search.php | 2 +- mod/file/upload.php | 2 +- mod/file/view.php | 2 +- mod/file/views/default/file/group_module.php | 2 +- mod/file/views/default/widgets/filerepo/content.php | 2 +- mod/groups/lib/groups.php | 6 +++--- mod/groups/views/default/widgets/a_users_groups/content.php | 2 +- mod/messageboard/index.php | 2 +- mod/messageboard/views/default/widgets/messageboard/content.php | 2 +- mod/messages/inbox.php | 2 +- mod/messages/read.php | 2 +- mod/messages/sent.php | 2 +- mod/pages/friends.php | 2 +- mod/pages/index.php | 2 +- mod/pages/revision.php | 2 +- mod/pages/view.php | 2 +- mod/pages/views/default/pages/group_module.php | 2 +- mod/pages/views/default/pages/sidebar/navigation.php | 2 +- mod/pages/views/default/widgets/pages/content.php | 2 +- mod/profile/icon.php | 2 +- mod/profile/views/default/profile/details.php | 2 +- mod/profile/views/default/profile/metatags.php | 2 +- mod/profile/views/default/profile/owner_block.php | 4 ++-- mod/thewire/index.php | 2 +- mod/thewire/views/default/widgets/thewire/content.php | 2 +- 38 files changed, 46 insertions(+), 46 deletions(-) (limited to 'mod') diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php index a88f223db..d304e53d3 100644 --- a/mod/blog/views/default/blog/group_module.php +++ b/mod/blog/views/default/blog/group_module.php @@ -3,7 +3,7 @@ * Group blog module */ -$group = elgg_get_page_owner(); +$group = elgg_get_page_owner_entity(); if ($group->blog_enable == "no") { return true; diff --git a/mod/blog/views/default/blog/sidebar/archives.php b/mod/blog/views/default/blog/sidebar/archives.php index f08c7ea7e..81cac40fc 100644 --- a/mod/blog/views/default/blog/sidebar/archives.php +++ b/mod/blog/views/default/blog/sidebar/archives.php @@ -4,7 +4,7 @@ */ $loggedin_user = get_loggedin_user(); -$page_owner = elgg_get_page_owner(); +$page_owner = elgg_get_page_owner_entity(); // This is a limitation of the URL schema. if ($page_owner && $vars['page'] != 'friends') { diff --git a/mod/blog/views/default/blog/sidebar/tagcloud.php b/mod/blog/views/default/blog/sidebar/tagcloud.php index 2f5ce3955..f1ef7ffdb 100644 --- a/mod/blog/views/default/blog/sidebar/tagcloud.php +++ b/mod/blog/views/default/blog/sidebar/tagcloud.php @@ -4,7 +4,7 @@ */ $loggedin_user = get_loggedin_user(); -$page_owner = elgg_get_page_owner(); +$page_owner = elgg_get_page_owner_entity(); if ($page_owner && $vars['page'] != 'friends') { diff --git a/mod/blog/views/default/widgets/blog/content.php b/mod/blog/views/default/widgets/blog/content.php index 83d1c0c41..713c0f07d 100644 --- a/mod/blog/views/default/widgets/blog/content.php +++ b/mod/blog/views/default/widgets/blog/content.php @@ -18,7 +18,7 @@ $content = elgg_list_entities($options); echo $content; if ($content) { - $blog_url = "pg/blog/owner/" . elgg_get_page_owner()->username; + $blog_url = "pg/blog/owner/" . elgg_get_page_owner_entity()->username; $more_link = elgg_view('output/url', array( 'href' => $blog_url, 'text' => elgg_echo('blog:moreblogs'), diff --git a/mod/bookmarks/bookmarklet.php b/mod/bookmarks/bookmarklet.php index 7a0c88a8d..8f97905f9 100644 --- a/mod/bookmarks/bookmarklet.php +++ b/mod/bookmarks/bookmarklet.php @@ -12,7 +12,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); gatekeeper(); // Get the current page's owner -$page_owner = elgg_get_page_owner(); +$page_owner = elgg_get_page_owner_entity(); if ($page_owner === false || is_null($page_owner) && (get_loggedin_user())) { $page_owner = get_loggedin_user(); set_page_owner($page_owner->getGUID()); diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 8550878b6..bed077864 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -56,7 +56,7 @@ function bookmarks_init() { function bookmarks_pagesetup() { global $CONFIG; - $page_owner = elgg_get_page_owner(); + $page_owner = elgg_get_page_owner_entity(); // Add group bookmark menu item if (isloggedin()) { @@ -110,7 +110,7 @@ function bookmarks_page_handler($page) { 'sidebar' => $sidebar, ); $body = elgg_view_layout('one_column_with_sidebar', $params); - echo elgg_view_page(elgg_echo("bookmarks:user", array(elgg_get_page_owner()->name)), $body); + echo elgg_view_page(elgg_echo("bookmarks:user", array(elgg_get_page_owner_entity()->name)), $body); return FALSE; } @@ -258,7 +258,7 @@ function bookmarks_page_handler($page) { 'sidebar' => $sidebar, ); $body = elgg_view_layout('two_sidebar', $params); - echo elgg_view_page(elgg_echo("bookmarks:user", array(elgg_get_page_owner()->name)), $body); + echo elgg_view_page(elgg_echo("bookmarks:user", array(elgg_get_page_owner_entity()->name)), $body); return TRUE; } diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php index 1e11ed1ca..75d3686b9 100644 --- a/mod/bookmarks/views/default/bookmarks/bookmarklet.php +++ b/mod/bookmarks/views/default/bookmarks/bookmarklet.php @@ -5,7 +5,7 @@ * @package ElggBookmarks */ -$page_owner = elgg_get_page_owner(); +$page_owner = elgg_get_page_owner_entity(); $bookmarktext = elgg_echo("bookmarks:this"); if ($page_owner instanceof ElggGroup) { diff --git a/mod/bookmarks/views/default/bookmarks/form.php b/mod/bookmarks/views/default/bookmarks/form.php index 7273836e2..12cd76ba7 100644 --- a/mod/bookmarks/views/default/bookmarks/form.php +++ b/mod/bookmarks/views/default/bookmarks/form.php @@ -25,9 +25,9 @@ if(isset($vars['entity'])){ if ($address == "previous") $address = $_SERVER['HTTP_REFERER']; $tags = array(); - if(elgg_get_page_owner() instanceof ElggGroup){ + if(elgg_get_page_owner_entity() instanceof ElggGroup){ //if in a group, set the access level to default to the group - $access_id = elgg_get_page_owner()->group_acl; + $access_id = elgg_get_page_owner_entity()->group_acl; }else{ $access_id = get_default_access(get_loggedin_user()); } @@ -89,7 +89,7 @@ if(isset($vars['entity'])){ 'access', 'value' => $access_id, diff --git a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php index 50d4dbdb2..dd1b6aa9c 100755 --- a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php +++ b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php @@ -5,7 +5,7 @@ $bookmarks = elgg_get_entities(array('type' => 'object', 'subtype' => 'bookmarks 'container_guids' => elgg_get_page_owner_guid(), 'limit' => 6)); ?>
-username; ?>"> +username; ?>">

" . $info . "
"; } } else { - $create_bookmark = elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner()->username . "/add"; + $create_bookmark = elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner_entity()->username . "/add"; echo "

" . elgg_echo("bookmarks:new") . "

"; } echo ""; \ No newline at end of file diff --git a/mod/bookmarks/views/default/widgets/bookmarks/view.php b/mod/bookmarks/views/default/widgets/bookmarks/view.php index 34b9ff834..6babbcd20 100644 --- a/mod/bookmarks/views/default/widgets/bookmarks/view.php +++ b/mod/bookmarks/views/default/widgets/bookmarks/view.php @@ -49,7 +49,7 @@ if ($bookmarks) { } if ($num_bookmarks > $num) { - $user_inbox = elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner()->username; + $user_inbox = elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner_entity()->username; echo "
" . elgg_echo('bookmarks:read') . "
"; } } else { diff --git a/mod/defaultwidgets/views/default/defaultwidgets/editor.php b/mod/defaultwidgets/views/default/defaultwidgets/editor.php index e84082107..0decde97d 100644 --- a/mod/defaultwidgets/views/default/defaultwidgets/editor.php +++ b/mod/defaultwidgets/views/default/defaultwidgets/editor.php @@ -11,7 +11,7 @@ **/ // set some defaults - $owner = elgg_get_page_owner(); + $owner = elgg_get_page_owner_entity(); $context = $vars['context']; $area1widgets = false; $area2widgets = false; diff --git a/mod/file/friends.php b/mod/file/friends.php index 795aa21ce..dada7494e 100644 --- a/mod/file/friends.php +++ b/mod/file/friends.php @@ -5,7 +5,7 @@ * @package ElggFile */ -$owner = elgg_get_page_owner(); +$owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/"); elgg_push_breadcrumb($owner->name, "pg/file/owner/$owner->username"); diff --git a/mod/file/index.php b/mod/file/index.php index 8f2546ca0..44906d72d 100644 --- a/mod/file/index.php +++ b/mod/file/index.php @@ -10,7 +10,7 @@ elgg_set_page_owner_guid(get_input('guid')); // access check for closed groups group_gatekeeper(); -$owner = elgg_get_page_owner(); +$owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/"); elgg_push_breadcrumb($owner->name); diff --git a/mod/file/search.php b/mod/file/search.php index 157b5b8b8..b7f82e951 100644 --- a/mod/file/search.php +++ b/mod/file/search.php @@ -12,7 +12,7 @@ $page_owner_guid = get_input('page_owner', null); if ($page_owner_guid) { elgg_set_page_owner_guid($page_owner_guid); } -$owner = elgg_get_page_owner(); +$owner = elgg_get_page_owner_entity(); group_gatekeeper(); diff --git a/mod/file/upload.php b/mod/file/upload.php index 8f10b9d82..f26b1bbee 100644 --- a/mod/file/upload.php +++ b/mod/file/upload.php @@ -8,7 +8,7 @@ elgg_load_library('elgg:file'); elgg_set_page_owner_guid(get_input('guid')); -$owner = elgg_get_page_owner(); +$owner = elgg_get_page_owner_entity(); gatekeeper(); group_gatekeeper(); diff --git a/mod/file/view.php b/mod/file/view.php index ee882f604..72660c406 100644 --- a/mod/file/view.php +++ b/mod/file/view.php @@ -8,7 +8,7 @@ $file = get_entity(get_input('guid')); elgg_set_page_owner_guid($file->getContainerGUID()); -$owner = elgg_get_page_owner(); +$owner = elgg_get_page_owner_entity(); elgg_push_breadcrumb(elgg_echo('file'), 'pg/file/all'); diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php index e0501709f..8a0318a37 100644 --- a/mod/file/views/default/file/group_module.php +++ b/mod/file/views/default/file/group_module.php @@ -3,7 +3,7 @@ * Group file module */ -$group = elgg_get_page_owner(); +$group = elgg_get_page_owner_entity(); if ($group->file_enable == "no") { return true; diff --git a/mod/file/views/default/widgets/filerepo/content.php b/mod/file/views/default/widgets/filerepo/content.php index d2cd246ae..d3deece56 100644 --- a/mod/file/views/default/widgets/filerepo/content.php +++ b/mod/file/views/default/widgets/filerepo/content.php @@ -21,7 +21,7 @@ $content = elgg_list_entities($options); echo $content; if ($content) { - $url = "pg/file/owner/" . elgg_get_page_owner()->username; + $url = "pg/file/owner/" . elgg_get_page_owner_entity()->username; $more_link = elgg_view('output/url', array( 'href' => $url, 'text' => elgg_echo('file:more'), diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index cb9daf8e9..924ce5e2a 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -62,7 +62,7 @@ function groups_handle_all_page() { */ function groups_handle_owned_page() { - $page_owner = elgg_get_page_owner(); + $page_owner = elgg_get_page_owner_entity(); $title = elgg_echo('groups:owned'); elgg_push_breadcrumb($title); @@ -88,7 +88,7 @@ function groups_handle_owned_page() { */ function groups_handle_mine_page() { - $page_owner = elgg_get_page_owner(); + $page_owner = elgg_get_page_owner_entity(); $title = elgg_echo('groups:yours'); elgg_push_breadcrumb($title); @@ -156,7 +156,7 @@ function groups_handle_edit_page($page, $guid = 0) { function groups_handle_invitations_page() { gatekeeper(); - $user = elgg_get_page_owner(); + $user = elgg_get_page_owner_entity(); $title = elgg_echo('groups:invitations'); elgg_push_breadcrumb($title); diff --git a/mod/groups/views/default/widgets/a_users_groups/content.php b/mod/groups/views/default/widgets/a_users_groups/content.php index b9060dbb0..c15e4507e 100644 --- a/mod/groups/views/default/widgets/a_users_groups/content.php +++ b/mod/groups/views/default/widgets/a_users_groups/content.php @@ -21,7 +21,7 @@ $content = elgg_list_entities_from_relationship($options); echo $content; if ($content) { - $url = "pg/group/member/" . elgg_get_page_owner()->username; + $url = "pg/group/member/" . elgg_get_page_owner_entity()->username; $more_link = elgg_view('output/url', array( 'href' => $url, 'text' => elgg_echo('groups:more'), diff --git a/mod/messageboard/index.php b/mod/messageboard/index.php index e0ab13f0e..c6d6bed7a 100644 --- a/mod/messageboard/index.php +++ b/mod/messageboard/index.php @@ -11,7 +11,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); // Get the user who is the owner of the message board -$entity = elgg_get_page_owner(); +$entity = elgg_get_page_owner_entity(); // Get any annotations for their message board $contents = $entity->getAnnotations('messageboard', 50, 0, 'desc'); diff --git a/mod/messageboard/views/default/widgets/messageboard/content.php b/mod/messageboard/views/default/widgets/messageboard/content.php index f4c822b3f..71315a526 100644 --- a/mod/messageboard/views/default/widgets/messageboard/content.php +++ b/mod/messageboard/views/default/widgets/messageboard/content.php @@ -8,7 +8,7 @@ */ //get the full page owner entity -$user = elgg_get_page_owner(); +$user = elgg_get_page_owner_entity(); //the number of message to display $num_display = 5; diff --git a/mod/messages/inbox.php b/mod/messages/inbox.php index b5c54a4e6..4b2d11bbf 100644 --- a/mod/messages/inbox.php +++ b/mod/messages/inbox.php @@ -7,7 +7,7 @@ gatekeeper(); -$page_owner = elgg_get_page_owner(); +$page_owner = elgg_get_page_owner_entity(); if (!$page_owner) { register_error(elgg_echo()); forward(); diff --git a/mod/messages/read.php b/mod/messages/read.php index 0c0fa60dd..5a735f18e 100644 --- a/mod/messages/read.php +++ b/mod/messages/read.php @@ -13,7 +13,7 @@ if (!$message) { } elgg_set_page_owner_guid($message->getOwnerGUID()); -$page_owner = elgg_get_page_owner(); +$page_owner = elgg_get_page_owner_entity(); $title = $message->title; diff --git a/mod/messages/sent.php b/mod/messages/sent.php index 36c9badd3..f884643e0 100644 --- a/mod/messages/sent.php +++ b/mod/messages/sent.php @@ -7,7 +7,7 @@ gatekeeper(); -$page_owner = elgg_get_page_owner(); +$page_owner = elgg_get_page_owner_entity(); if (!$page_owner) { register_error(elgg_echo()); forward(); diff --git a/mod/pages/friends.php b/mod/pages/friends.php index 1f047701e..51c07194f 100644 --- a/mod/pages/friends.php +++ b/mod/pages/friends.php @@ -8,7 +8,7 @@ $guid = get_input('guid'); elgg_set_page_owner_guid($guid); -$owner = elgg_get_page_owner(); +$owner = elgg_get_page_owner_entity(); if (!$owner) { } diff --git a/mod/pages/index.php b/mod/pages/index.php index c4e391206..afda594cb 100644 --- a/mod/pages/index.php +++ b/mod/pages/index.php @@ -8,7 +8,7 @@ $guid = get_input('guid'); elgg_set_page_owner_guid($guid); -$owner = elgg_get_page_owner(); +$owner = elgg_get_page_owner_entity(); if (!$owner) { } diff --git a/mod/pages/revision.php b/mod/pages/revision.php index aa0665635..1945bb8af 100644 --- a/mod/pages/revision.php +++ b/mod/pages/revision.php @@ -20,7 +20,7 @@ elgg_set_page_owner_guid($page->getContainerGUID()); group_gatekeeper(); -$container = elgg_get_page_owner(); +$container = elgg_get_page_owner_entity(); if (!$container) { } diff --git a/mod/pages/view.php b/mod/pages/view.php index 69ae5686c..f3d846f23 100644 --- a/mod/pages/view.php +++ b/mod/pages/view.php @@ -15,7 +15,7 @@ elgg_set_page_owner_guid($page->getContainerGUID()); group_gatekeeper(); -$container = elgg_get_page_owner(); +$container = elgg_get_page_owner_entity(); if (!$container) { } diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php index 2e6b7f6ec..87845e224 100644 --- a/mod/pages/views/default/pages/group_module.php +++ b/mod/pages/views/default/pages/group_module.php @@ -6,7 +6,7 @@ */ -$group = elgg_get_page_owner(); +$group = elgg_get_page_owner_entity(); if ($group->pages_enable == "no") { return true; diff --git a/mod/pages/views/default/pages/sidebar/navigation.php b/mod/pages/views/default/pages/sidebar/navigation.php index 806fc2f52..141cf8a64 100644 --- a/mod/pages/views/default/pages/sidebar/navigation.php +++ b/mod/pages/views/default/pages/sidebar/navigation.php @@ -12,7 +12,7 @@ if ($selected_page) { $title = elgg_echo('pages:navigation'); -pages_register_navigation_tree(elgg_get_page_owner()); +pages_register_navigation_tree(elgg_get_page_owner_entity()); $content = elgg_view_menu('pages_nav', array('class' => 'pages-nav')); if (!$content) { diff --git a/mod/pages/views/default/widgets/pages/content.php b/mod/pages/views/default/widgets/pages/content.php index 63a2d8e7e..eea482273 100644 --- a/mod/pages/views/default/widgets/pages/content.php +++ b/mod/pages/views/default/widgets/pages/content.php @@ -20,7 +20,7 @@ $content = elgg_list_entities($options); echo $content; if ($content) { - $url = "pg/pages/owner/" . elgg_get_page_owner()->username; + $url = "pg/pages/owner/" . elgg_get_page_owner_entity()->username; $more_link = elgg_view('output/url', array( 'href' => $url, 'text' => elgg_echo('pages:more'), diff --git a/mod/profile/icon.php b/mod/profile/icon.php index 48ccc16c2..2848c3e4d 100644 --- a/mod/profile/icon.php +++ b/mod/profile/icon.php @@ -8,7 +8,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); // Get the owning user -$user = elgg_get_page_owner(); +$user = elgg_get_page_owner_entity(); // Get the size $size = strtolower(get_input('size')); diff --git a/mod/profile/views/default/profile/details.php b/mod/profile/views/default/profile/details.php index 31630fb69..649a5b2cc 100644 --- a/mod/profile/views/default/profile/details.php +++ b/mod/profile/views/default/profile/details.php @@ -4,7 +4,7 @@ * @uses $vars['entity'] The user entity */ -$user = elgg_get_page_owner(); +$user = elgg_get_page_owner_entity(); $profile_fields = elgg_get_config('profile_fields'); diff --git a/mod/profile/views/default/profile/metatags.php b/mod/profile/views/default/profile/metatags.php index 1197a2e0a..54ee322e2 100644 --- a/mod/profile/views/default/profile/metatags.php +++ b/mod/profile/views/default/profile/metatags.php @@ -6,7 +6,7 @@ * */ -if (elgg_get_page_owner()) { +if (elgg_get_page_owner_entity()) { ?> elgg_get_page_owner(), + 'entity' => elgg_get_page_owner_entity(), 'class' => 'profile-content-menu', )); diff --git a/mod/thewire/index.php b/mod/thewire/index.php index 6cd49e472..fc0901d13 100644 --- a/mod/thewire/index.php +++ b/mod/thewire/index.php @@ -10,7 +10,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); // Get the current page's owner - $page_owner = elgg_get_page_owner(); + $page_owner = elgg_get_page_owner_entity(); if ($page_owner === false || is_null($page_owner)) { $page_owner = get_loggedin_user(); set_page_owner($page_owner->getGUID()); diff --git a/mod/thewire/views/default/widgets/thewire/content.php b/mod/thewire/views/default/widgets/thewire/content.php index bed5c140b..6de5f1e64 100644 --- a/mod/thewire/views/default/widgets/thewire/content.php +++ b/mod/thewire/views/default/widgets/thewire/content.php @@ -10,6 +10,6 @@ $content = elgg_list_entities(array('types' => 'object', 'subtypes' => 'thewire' echo $content; if ($content) { - $blogurl = elgg_get_site_url() . "pg/thewire/" . elgg_get_page_owner()->username; + $blogurl = elgg_get_site_url() . "pg/thewire/" . elgg_get_page_owner_entity()->username; echo "
".elgg_echo('thewire:moreposts')."
"; } -- cgit v1.2.3