From c27eac2d2a970e76a1204757bbe15da8efb2870c Mon Sep 17 00:00:00 2001 From: ewinslow Date: Sat, 30 Oct 2010 21:48:24 +0000 Subject: Refs #1439: Using new page_owner functions in all of core git-svn-id: http://code.elgg.org/elgg/trunk@7140 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/blog/views/default/blog/sidebar_menu.php | 4 ++-- mod/bookmarks/bookmarklet.php | 2 +- mod/bookmarks/start.php | 12 ++++++------ mod/bookmarks/views/default/bookmarks/bookmarklet.php | 2 +- mod/bookmarks/views/default/bookmarks/form.php | 6 +++--- mod/bookmarks/views/default/bookmarks/group_bookmarks.php | 6 +++--- mod/bookmarks/views/default/widgets/bookmarks/view.php | 2 +- mod/defaultwidgets/views/default/defaultwidgets/editor.php | 4 ++-- mod/file/edit.php | 2 +- mod/file/friends.php | 2 +- mod/file/index.php | 8 ++++---- mod/file/search.php | 4 ++-- mod/file/start.php | 2 +- mod/file/upload.php | 2 +- mod/file/views/default/file/groupprofile_files.php | 2 +- mod/file/views/default/file/typecloud.php | 2 +- mod/file/views/default/file/upload.php | 2 +- mod/file/world.php | 2 +- mod/groups/activity.php | 4 ++-- mod/groups/addtopic.php | 2 +- mod/groups/all.php | 2 +- mod/groups/edittopic.php | 2 +- mod/groups/forum.php | 2 +- mod/groups/index.php | 2 +- mod/groups/membership.php | 2 +- mod/groups/start.php | 4 ++-- mod/groups/topicposts.php | 2 +- mod/groups/views/default/forum/maintopic.php | 2 +- mod/groups/views/default/forum/topics.php | 2 +- mod/groups/views/default/forum/viewposts.php | 2 +- mod/groups/views/default/groups/activity_latest.php | 4 ++-- mod/groups/views/default/groups/forum_latest.php | 6 +++--- mod/groups/views/default/object/groupforumtopic.php | 2 +- mod/members/index.php | 6 +++--- mod/messageboard/index.php | 2 +- mod/messageboard/views/default/messageboard/forms/add.php | 2 +- mod/messageboard/views/default/widgets/messageboard/view.php | 4 ++-- mod/messages/send.php | 2 +- mod/pages/edit.php | 2 +- mod/pages/history.php | 2 +- mod/pages/index.php | 8 ++++---- mod/pages/new.php | 4 ++-- mod/pages/start.php | 6 +++--- mod/pages/view.php | 6 +++--- mod/pages/views/default/forms/pages/edit.php | 4 ++-- mod/pages/views/default/pages/groupprofile_pages.php | 2 +- mod/pages/views/default/widgets/pages/view.php | 4 ++-- mod/pages/welcome.php | 4 ++-- mod/pages/world.php | 6 +++--- mod/profile/edit.php | 2 +- mod/profile/editicon.php | 2 +- mod/profile/icon.php | 2 +- mod/profile/start.php | 2 +- mod/profile/views/default/profile/admin_menu.php | 4 ++-- .../views/default/profile/commentwall/commentwalladd.php | 2 +- mod/profile/views/default/profile/edit.php | 4 ++-- mod/profile/views/default/profile/listing.php | 4 ++-- mod/profile/views/default/profile/metatags.php | 2 +- .../views/default/profile/profile_contents/details.php | 4 ++-- mod/profile/views/default/profile/profile_ownerblock.php | 4 ++-- mod/reportedcontent/add.php | 2 +- mod/tagcloud/views/default/widgets/tagcloud/view.php | 2 +- mod/thewire/index.php | 4 ++-- mod/thewire/start.php | 2 +- mod/thewire/views/default/widgets/thewire/view.php | 2 +- 65 files changed, 107 insertions(+), 107 deletions(-) (limited to 'mod') diff --git a/mod/blog/views/default/blog/sidebar_menu.php b/mod/blog/views/default/blog/sidebar_menu.php index ffa8d1bd4..ab00433c8 100644 --- a/mod/blog/views/default/blog/sidebar_menu.php +++ b/mod/blog/views/default/blog/sidebar_menu.php @@ -22,7 +22,7 @@ Owned blogs; */ $loggedin_user = get_loggedin_user(); -$page_owner = page_owner_entity(); +$page_owner = elgg_get_page_owner(); // include a view for plugins to extend echo elgg_view("blogs/sidebar", array("object_type" => 'blog')); @@ -46,7 +46,7 @@ if ($page_owner) { $timestamphigh = mktime(0, 0, 0, ((int) substr($date, 4, 2)) + 1, 1, substr($date, 0, 4)); if (!isset($page_owner)) { - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); } $link = $CONFIG->wwwroot . 'pg/blog/' . $page_owner->username . '/archive/' . $timestamplow . '/' . $timestamphigh; diff --git a/mod/bookmarks/bookmarklet.php b/mod/bookmarks/bookmarklet.php index e1ff3c6df..ecfe61ae5 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 = page_owner_entity(); +$page_owner = elgg_get_page_owner(); 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 3d748fabe..25b87b6c7 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -53,7 +53,7 @@ function bookmarks_init() { function bookmarks_pagesetup() { global $CONFIG; - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); // Add group bookmark menu item if (isloggedin()) { @@ -79,13 +79,13 @@ function bookmarks_page_handler($page) { // The first component of a bookmarks URL is the username // If the username is set_input()'d and has group:NN in it, magic happens - // and the page_owner_entity() is the group. + // and the elgg_get_page_owner() is the group. if (isset($page[0])) { $owner_name = $page[0]; set_input('username', $owner_name); // grab the page owner here so the group magic works. - $owner = page_owner_entity(); + $owner = elgg_get_page_owner(); } else { set_page_owner(get_loggedin_userid()); } @@ -96,7 +96,7 @@ function bookmarks_page_handler($page) { $content = elgg_echo("bookmarks:unknown_user"); $body = elgg_view_layout('one_column_with_sidebar', $content, $sidebar); - echo page_draw(sprintf(elgg_echo("bookmarks:user"), page_owner_entity()->name), $body); + echo page_draw(sprintf(elgg_echo("bookmarks:user"), elgg_get_page_owner()->name), $body); return FALSE; } @@ -105,7 +105,7 @@ function bookmarks_page_handler($page) { $section = (isset($page[1])) ? $page[1] : $section = 'items'; //don't show the all site bookmarks breadcrumb when on the all site bookmarks page - if(page_owner() != 0){ + if(elgg_get_page_owner_guid() != 0){ elgg_push_breadcrumb(elgg_echo('bookmarks:all'), $CONFIG->wwwroot . 'pg/bookmarks/'); } @@ -240,7 +240,7 @@ function bookmarks_page_handler($page) { $content = $header . $content; $body = elgg_view_layout('one_column_with_sidebar', $content, $sidebar); - echo page_draw(sprintf(elgg_echo("bookmarks:user"), page_owner_entity()->name), $body); + echo page_draw(sprintf(elgg_echo("bookmarks:user"), elgg_get_page_owner()->name), $body); return TRUE; } diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php index 5205632f2..38ef95152 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 = page_owner_entity(); +$page_owner = elgg_get_page_owner(); $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 b779116fd..deef1f7af 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(page_owner_entity() instanceof ElggGroup){ + if(elgg_get_page_owner() instanceof ElggGroup){ //if in a group, set the access level to default to the group - $access_id = page_owner_entity()->group_acl; + $access_id = elgg_get_page_owner()->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 652743b7b..b476e8cf2 100755 --- a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php +++ b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php @@ -2,10 +2,10 @@ //grab the groups bookmarks $bookmarks = elgg_get_entities(array('type' => 'object', 'subtype' => 'bookmarks', - 'container_guids' => page_owner(), 'limit' => 6)); + 'container_guids' => elgg_get_page_owner_guid(), 'limit' => 6)); ?>
-username; ?>"> +username; ?>">

" . $info . "
"; } } else { - $create_bookmark = $vars['url'] . "pg/bookmarks/" . page_owner_entity()->username . "/add"; + $create_bookmark = $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->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 37d4ce3a4..1504ec8b4 100644 --- a/mod/bookmarks/views/default/widgets/bookmarks/view.php +++ b/mod/bookmarks/views/default/widgets/bookmarks/view.php @@ -43,7 +43,7 @@ if($bookmarks){ } - $user_inbox = $vars['url'] . "pg/bookmarks/" . page_owner_entity()->username; + $user_inbox = $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username; if (get_entities('object', 'bookmarks', $vars['entity']->container_guid, '', '', '', true) > $num) echo "
".elgg_echo('bookmarks:read')."
"; diff --git a/mod/defaultwidgets/views/default/defaultwidgets/editor.php b/mod/defaultwidgets/views/default/defaultwidgets/editor.php index bdcbd1f9a..6a3756d13 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 = page_owner_entity(); + $owner = elgg_get_page_owner(); $context = $vars['context']; $area1widgets = false; $area2widgets = false; @@ -261,7 +261,7 @@ $(document).ready(function () { echo elgg_view('input/hidden',array('internalname' => '__elgg_ts', 'value' => $vars['ts'])); ?> - + diff --git a/mod/file/edit.php b/mod/file/edit.php index 6c7dbd092..8d091caa0 100644 --- a/mod/file/edit.php +++ b/mod/file/edit.php @@ -18,7 +18,7 @@ if (!$file) { } // Set the page owner -$page_owner = page_owner_entity(); +$page_owner = elgg_get_page_owner(); if (!$page_owner) { $container_guid = $file->container_guid; if ($container_guid) { diff --git a/mod/file/friends.php b/mod/file/friends.php index d7d47acf7..984aedc60 100644 --- a/mod/file/friends.php +++ b/mod/file/friends.php @@ -11,7 +11,7 @@ group_gatekeeper(); } - $owner = page_owner_entity(); + $owner = elgg_get_page_owner(); $title = sprintf(elgg_echo("file:friends"),$owner->name); $area1 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file')); diff --git a/mod/file/index.php b/mod/file/index.php index 9c2745f1b..28ec07031 100644 --- a/mod/file/index.php +++ b/mod/file/index.php @@ -14,20 +14,20 @@ group_gatekeeper(); //set the title - if (page_owner() == get_loggedin_userid()) { + if (elgg_get_page_owner_guid() == get_loggedin_userid()) { $title = elgg_echo('file:yours'); $area1 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'file')); } else { - $title = sprintf(elgg_echo("file:user"),page_owner_entity()->name); + $title = sprintf(elgg_echo("file:user"),elgg_get_page_owner()->name); $area1 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file')); } // Get objects set_context('search'); $offset = (int)get_input('offset', 0); - $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'container_guid' => page_owner(), 'limit' => 10, 'offset' => $offset, 'full_view' => FALSE)); + $area2 .= elgg_list_entities(array('types' => 'object', 'subtypes' => 'file', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => 10, 'offset' => $offset, 'full_view' => FALSE)); set_context('file'); - $get_filter = get_filetype_cloud(page_owner()); + $get_filter = get_filetype_cloud(elgg_get_page_owner_guid()); if ($get_filter) { $area1 .= $get_filter; } else { diff --git a/mod/file/search.php b/mod/file/search.php index 1b646f361..9279129a8 100644 --- a/mod/file/search.php +++ b/mod/file/search.php @@ -53,8 +53,8 @@ if (is_array($owner_guid)) { //$area2 = elgg_view_title(elgg_echo("file:friends:type:" . $tag)); $area2 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file')); - } else if (page_owner() && page_owner() != $_SESSION['guid']) { - //$area2 = elgg_view_title(sprintf(elgg_echo("file:user:type:" . $tag),page_owner_entity()->name)); + } else if (elgg_get_page_owner_guid() && elgg_get_page_owner_guid() != $_SESSION['guid']) { + //$area2 = elgg_view_title(sprintf(elgg_echo("file:user:type:" . $tag),elgg_get_page_owner()->name)); $area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'file')); } else{ //$area2 = elgg_view_title(elgg_echo("file:type:" . $tag)); diff --git a/mod/file/start.php b/mod/file/start.php index 1910b26b8..60e863df5 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -74,7 +74,7 @@ global $CONFIG; - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); // Group submenu option if ($page_owner instanceof ElggGroup && get_context() == "groups") { diff --git a/mod/file/upload.php b/mod/file/upload.php index 6f9d3d750..a4cd4e01e 100644 --- a/mod/file/upload.php +++ b/mod/file/upload.php @@ -14,7 +14,7 @@ // Render the file upload page - $container_guid = page_owner(); + $container_guid = elgg_get_page_owner_guid(); $area1 = elgg_view_title($title = elgg_echo('file:upload')); $area1 .= elgg_view("file/upload", array('container_guid' => $container_guid)); $body = elgg_view_layout('one_column_with_sidebar', $area1); diff --git a/mod/file/views/default/file/groupprofile_files.php b/mod/file/views/default/file/groupprofile_files.php index 312a5c5cf..f520f0d2e 100644 --- a/mod/file/views/default/file/groupprofile_files.php +++ b/mod/file/views/default/file/groupprofile_files.php @@ -41,7 +41,7 @@ //get a link to the users files - $users_file_url = $vars['url'] . "pg/file/" . page_owner_entity()->username; + $users_file_url = $vars['url'] . "pg/file/" . elgg_get_page_owner()->username; echo "

" . elgg_echo('file:more') . "

"; diff --git a/mod/file/views/default/file/typecloud.php b/mod/file/views/default/file/typecloud.php index 5ac831cfe..e404327ae 100644 --- a/mod/file/views/default/file/typecloud.php +++ b/mod/file/views/default/file/typecloud.php @@ -37,7 +37,7 @@ if ($tag == "image") $url .= "&search_viewtype=gallery"; - $url .= "&page_owner=" . page_owner(); + $url .= "&page_owner=" . elgg_get_page_owner_guid(); $inputtag = get_input('tag'); if ($inputtag == $tag || (empty($inputtag) && $tag == "all")) { diff --git a/mod/file/views/default/file/upload.php b/mod/file/views/default/file/upload.php index 0a94589e5..f89cf86d3 100644 --- a/mod/file/views/default/file/upload.php +++ b/mod/file/views/default/file/upload.php @@ -27,7 +27,7 @@ $access_id = 0; } $access_id = isset($_SESSION['uploadaccessid']) ? $_SESSION['uploadaccessid'] : $access_id; - $container_guid = page_owner_entity()->guid; + $container_guid = elgg_get_page_owner_guid(); } // make sure session cache is cleared diff --git a/mod/file/world.php b/mod/file/world.php index 21e741184..2bc24bd66 100644 --- a/mod/file/world.php +++ b/mod/file/world.php @@ -11,7 +11,7 @@ $offset = get_input("offset", 0); // Get the current page's owner - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); if ($page_owner === false || is_null($page_owner)) { $page_owner = get_loggedin_user(); set_page_owner($_SESSION['guid']); diff --git a/mod/groups/activity.php b/mod/groups/activity.php index 9081dbe8d..38d94fa4e 100644 --- a/mod/groups/activity.php +++ b/mod/groups/activity.php @@ -7,7 +7,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); $group_guid = (int)get_input('group'); set_page_owner($group_guid); -if (!(page_owner_entity() instanceof ElggGroup)) { +if (!(elgg_get_page_owner() instanceof ElggGroup)) { forward(); } group_gatekeeper(); @@ -50,7 +50,7 @@ if (count($entity_guids) > 0) { $area1 .= elgg_view_title(elgg_echo('groups:activity')); $area1 .= elgg_view("group_activity/extend"); $area1 .= "
".$river_items."
"; -$title = sprintf(elgg_echo("groups:activity"), page_owner_entity()->name); +$title = sprintf(elgg_echo("groups:activity"), elgg_get_page_owner()->name); $body = elgg_view_layout('one_column_with_sidebar', $area1); // Finally draw the page diff --git a/mod/groups/addtopic.php b/mod/groups/addtopic.php index cc02fa4eb..8d62bf19f 100644 --- a/mod/groups/addtopic.php +++ b/mod/groups/addtopic.php @@ -10,7 +10,7 @@ group_gatekeeper(); $page_owner = set_page_owner((int) get_input('group_guid')); -if (!(page_owner_entity() instanceof ElggGroup)) forward(); +if (!(elgg_get_page_owner() instanceof ElggGroup)) forward(); // sort the display $area2 = elgg_view("forms/forums/addtopic"); diff --git a/mod/groups/all.php b/mod/groups/all.php index dda000f95..c51097910 100644 --- a/mod/groups/all.php +++ b/mod/groups/all.php @@ -54,7 +54,7 @@ $objects = "
".$objects."
"; - $title = sprintf(elgg_echo("groups:all"), page_owner_entity()->name); + $title = sprintf(elgg_echo("groups:all"), elgg_get_page_owner()->name); if(isloggedin()){ $area1 .= elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new")); } diff --git a/mod/groups/edittopic.php b/mod/groups/edittopic.php index b09efacbe..2c457f53b 100644 --- a/mod/groups/edittopic.php +++ b/mod/groups/edittopic.php @@ -12,7 +12,7 @@ get_input('group'); $page_owner = set_page_owner((int)get_input('group')); // check the user is a member of the group -if (!(page_owner_entity() instanceof ElggGroup)) forward(); +if (!(elgg_get_page_owner() instanceof ElggGroup)) forward(); //get the topic $topic = get_entity((int) get_input('topic')); diff --git a/mod/groups/forum.php b/mod/groups/forum.php index c06bb2ebb..a6b88f9fb 100644 --- a/mod/groups/forum.php +++ b/mod/groups/forum.php @@ -7,7 +7,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); $group_guid = (int)get_input('group_guid'); set_page_owner($group_guid); -if (!(page_owner_entity() instanceof ElggGroup)) { +if (!(elgg_get_page_owner() instanceof ElggGroup)) { forward(); } diff --git a/mod/groups/index.php b/mod/groups/index.php index a06c67f73..398996072 100644 --- a/mod/groups/index.php +++ b/mod/groups/index.php @@ -16,7 +16,7 @@ $area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new")); set_context('search'); - $objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => page_owner(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE)); + $objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE)); set_context('groups'); $area1 .= $objects; diff --git a/mod/groups/membership.php b/mod/groups/membership.php index 0085033fa..b479018ca 100644 --- a/mod/groups/membership.php +++ b/mod/groups/membership.php @@ -14,7 +14,7 @@ $limit = get_input("limit", 10); $offset = get_input("offset", 0); - if (page_owner() == get_loggedin_userid()) { + if (elgg_get_page_owner_guid() == get_loggedin_userid()) { $title = elgg_echo("groups:yours"); } else $title = elgg_echo("groups:owned"); diff --git a/mod/groups/start.php b/mod/groups/start.php index 689e24863..b81ae81ce 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -200,7 +200,7 @@ global $CONFIG; // Get the page owner entity - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); if (get_context() == 'groups') { if ($page_owner instanceof ElggGroup) { @@ -399,7 +399,7 @@ */ function groups_write_acl_plugin_hook($hook, $entity_type, $returnvalue, $params) { - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); if (!$loggedin = get_loggedin_user()) { return $returnvalue; } diff --git a/mod/groups/topicposts.php b/mod/groups/topicposts.php index afd916ad2..d3ba05ead 100644 --- a/mod/groups/topicposts.php +++ b/mod/groups/topicposts.php @@ -15,7 +15,7 @@ //get_input('group_guid'); set_page_owner(get_input('group_guid')); - if (!(page_owner_entity() instanceof ElggGroup)) forward(); + if (!(elgg_get_page_owner() instanceof ElggGroup)) forward(); group_gatekeeper(); diff --git a/mod/groups/views/default/forum/maintopic.php b/mod/groups/views/default/forum/maintopic.php index 3eb124395..03e628846 100644 --- a/mod/groups/views/default/forum/maintopic.php +++ b/mod/groups/views/default/forum/maintopic.php @@ -23,7 +23,7 @@ // display the user name echo "
"; // if comment owner, group owner, or site admin - display edit and delete options - if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) { + if (groups_can_edit_discussion($vars['entity'], elgg_get_page_owner()->owner_guid)) { echo " isMember(get_loggedin_user())) { + if(elgg_get_page_owner()->isMember(get_loggedin_user())) { ?>
diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php index f0810ba18..407869314 100644 --- a/mod/groups/views/default/forum/viewposts.php +++ b/mod/groups/views/default/forum/viewposts.php @@ -39,7 +39,7 @@ echo elgg_view('navigation/pagination',array( echo "

" . elgg_echo("groups:topicisclosed") . "

"; echo "

" . elgg_echo("groups:topiccloseddesc") . "

"; - }elseif(page_owner_entity()->isMember(get_loggedin_user())){ + }elseif(elgg_get_page_owner()->isMember(get_loggedin_user())){ //comments are on and the user viewing is a member echo elgg_view_comments($vars['entity']); }else{ diff --git a/mod/groups/views/default/groups/activity_latest.php b/mod/groups/views/default/groups/activity_latest.php index 4947cfc0b..ea16964c3 100644 --- a/mod/groups/views/default/groups/activity_latest.php +++ b/mod/groups/views/default/groups/activity_latest.php @@ -5,10 +5,10 @@ * @package Groups */ ?> -"> +">

guid; $limit = 5; diff --git a/mod/groups/views/default/groups/forum_latest.php b/mod/groups/views/default/groups/forum_latest.php index 2a9ddaf42..b84a224ab 100644 --- a/mod/groups/views/default/groups/forum_latest.php +++ b/mod/groups/views/default/groups/forum_latest.php @@ -5,7 +5,7 @@ //check to make sure this group forum has been activated if($vars['entity']->forum_enable != 'no'){ ?> -"> +">

forum_enable != 'no'){ echo "
"; } } else { - if(page_owner_entity()->isMember(get_loggedin_user())){ - $create_discussion = $vars['url'] . "mod/groups/addtopic.php?group_guid=" . page_owner(); + if(elgg_get_page_owner()->isMember(get_loggedin_user())){ + $create_discussion = $vars['url'] . "mod/groups/addtopic.php?group_guid=" . elgg_get_page_owner_guid(); echo "

".elgg_echo("groups:addtopic")."

"; }else{ echo "

". elgg_echo("grouptopic:notcreated") . "

"; diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index 74a66c6d7..2fdf24723 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -49,7 +49,7 @@ if (get_context() == "search") { } $info .= "

" . elgg_echo('groups:started') . " " . $topic_owner->name . ": guid}&group_guid={$group->guid}\">{$title}

"; - if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) { + if (groups_can_edit_discussion($vars['entity'], elgg_get_page_owner()->owner_guid)) { // display the delete link to those allowed to delete $info .= ""; } $profile_actions = ""; -if (isloggedin() && (get_loggedin_userid() == page_owner())) { +if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) { $profile_actions = "
"; $profile_actions .= "username}/edit/details' class='action_button'>". elgg_echo('profile:edit') .""; $profile_actions .= "username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') .""; diff --git a/mod/reportedcontent/add.php b/mod/reportedcontent/add.php index 9b6032d04..9a377b2d3 100644 --- a/mod/reportedcontent/add.php +++ b/mod/reportedcontent/add.php @@ -12,7 +12,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); gatekeeper(); // Get the current page's owner -$page_owner = page_owner_entity(); +$page_owner = elgg_get_page_owner(); if ($page_owner === false || is_null($page_owner)) { $page_owner = get_loggedin_user(); set_page_owner($page_owner->getGUID()); diff --git a/mod/tagcloud/views/default/widgets/tagcloud/view.php b/mod/tagcloud/views/default/widgets/tagcloud/view.php index dc9666185..a290d8e37 100644 --- a/mod/tagcloud/views/default/widgets/tagcloud/view.php +++ b/mod/tagcloud/views/default/widgets/tagcloud/view.php @@ -4,6 +4,6 @@ if (!isset($num_items)) $num_items = 30; $prev_context = get_context(); - echo display_tagcloud(1, $num_items, 'tags', '', '', page_owner()); + echo display_tagcloud(1, $num_items, 'tags', '', '', elgg_get_page_owner_guid()); set_context($prev_context); ?> diff --git a/mod/thewire/index.php b/mod/thewire/index.php index 489427975..a0bc1757d 100644 --- a/mod/thewire/index.php +++ b/mod/thewire/index.php @@ -10,14 +10,14 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); // Get the current page's owner - $page_owner = page_owner_entity(); + $page_owner = elgg_get_page_owner(); if ($page_owner === false || is_null($page_owner)) { $page_owner = get_loggedin_user(); set_page_owner($page_owner->getGUID()); } // title - if (page_owner() == $_SESSION['guid']) { + if (elgg_get_page_owner_guid() == $_SESSION['guid']) { $area2 = elgg_view_title(elgg_echo("thewire:read")); } else { $area2 = elgg_view_title(sprintf(elgg_echo("thewire:user"),$page_owner->name)); diff --git a/mod/thewire/start.php b/mod/thewire/start.php index 5091f5e5c..097d74001 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -60,7 +60,7 @@ //add submenu options if (get_context() == "thewire") { - if ((page_owner() == $_SESSION['guid'] || !page_owner()) && isloggedin()) { + if ((elgg_get_page_owner_guid() == $_SESSION['guid'] || !elgg_get_page_owner_guid()) && isloggedin()) { add_submenu_item(elgg_echo('thewire:read'),$CONFIG->wwwroot."pg/thewire/" . get_loggedin_user()->username); add_submenu_item(elgg_echo('thewire:everyone'),$CONFIG->wwwroot."mod/thewire/everyone.php"); //add_submenu_item(elgg_echo('thewire:add'),$CONFIG->wwwroot."mod/thewire/add.php"); diff --git a/mod/thewire/views/default/widgets/thewire/view.php b/mod/thewire/views/default/widgets/thewire/view.php index 39fe368d0..c3f9e7858 100644 --- a/mod/thewire/views/default/widgets/thewire/view.php +++ b/mod/thewire/views/default/widgets/thewire/view.php @@ -10,6 +10,6 @@ $content = elgg_list_entities(array('types' => 'object', 'subtypes' => 'thewire' echo $content; if ($content) { - $blogurl = $vars['url'] . "pg/thewire/" . page_owner_entity()->username; + $blogurl = $vars['url'] . "pg/thewire/" . elgg_get_page_owner()->username; echo ""; } -- cgit v1.2.3