aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:48:24 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-30 21:48:24 +0000
commitc27eac2d2a970e76a1204757bbe15da8efb2870c (patch)
tree7f524d3ee95391163293d9f77a945e2915c3e8ac /mod
parentf49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (diff)
downloadelgg-c27eac2d2a970e76a1204757bbe15da8efb2870c.tar.gz
elgg-c27eac2d2a970e76a1204757bbe15da8efb2870c.tar.bz2
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
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/views/default/blog/sidebar_menu.php4
-rw-r--r--mod/bookmarks/bookmarklet.php2
-rw-r--r--mod/bookmarks/start.php12
-rw-r--r--mod/bookmarks/views/default/bookmarks/bookmarklet.php2
-rw-r--r--mod/bookmarks/views/default/bookmarks/form.php6
-rwxr-xr-xmod/bookmarks/views/default/bookmarks/group_bookmarks.php6
-rw-r--r--mod/bookmarks/views/default/widgets/bookmarks/view.php2
-rw-r--r--mod/defaultwidgets/views/default/defaultwidgets/editor.php4
-rw-r--r--mod/file/edit.php2
-rw-r--r--mod/file/friends.php2
-rw-r--r--mod/file/index.php8
-rw-r--r--mod/file/search.php4
-rw-r--r--mod/file/start.php2
-rw-r--r--mod/file/upload.php2
-rw-r--r--mod/file/views/default/file/groupprofile_files.php2
-rw-r--r--mod/file/views/default/file/typecloud.php2
-rw-r--r--mod/file/views/default/file/upload.php2
-rw-r--r--mod/file/world.php2
-rw-r--r--mod/groups/activity.php4
-rw-r--r--mod/groups/addtopic.php2
-rw-r--r--mod/groups/all.php2
-rw-r--r--mod/groups/edittopic.php2
-rw-r--r--mod/groups/forum.php2
-rw-r--r--mod/groups/index.php2
-rw-r--r--mod/groups/membership.php2
-rw-r--r--mod/groups/start.php4
-rw-r--r--mod/groups/topicposts.php2
-rw-r--r--mod/groups/views/default/forum/maintopic.php2
-rw-r--r--mod/groups/views/default/forum/topics.php2
-rw-r--r--mod/groups/views/default/forum/viewposts.php2
-rw-r--r--mod/groups/views/default/groups/activity_latest.php4
-rw-r--r--mod/groups/views/default/groups/forum_latest.php6
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php2
-rw-r--r--mod/members/index.php6
-rw-r--r--mod/messageboard/index.php2
-rw-r--r--mod/messageboard/views/default/messageboard/forms/add.php2
-rw-r--r--mod/messageboard/views/default/widgets/messageboard/view.php4
-rw-r--r--mod/messages/send.php2
-rw-r--r--mod/pages/edit.php2
-rw-r--r--mod/pages/history.php2
-rw-r--r--mod/pages/index.php8
-rw-r--r--mod/pages/new.php4
-rw-r--r--mod/pages/start.php6
-rw-r--r--mod/pages/view.php6
-rw-r--r--mod/pages/views/default/forms/pages/edit.php4
-rw-r--r--mod/pages/views/default/pages/groupprofile_pages.php2
-rw-r--r--mod/pages/views/default/widgets/pages/view.php4
-rw-r--r--mod/pages/welcome.php4
-rw-r--r--mod/pages/world.php6
-rw-r--r--mod/profile/edit.php2
-rw-r--r--mod/profile/editicon.php2
-rw-r--r--mod/profile/icon.php2
-rw-r--r--mod/profile/start.php2
-rwxr-xr-xmod/profile/views/default/profile/admin_menu.php4
-rw-r--r--mod/profile/views/default/profile/commentwall/commentwalladd.php2
-rw-r--r--mod/profile/views/default/profile/edit.php4
-rw-r--r--mod/profile/views/default/profile/listing.php4
-rw-r--r--mod/profile/views/default/profile/metatags.php2
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/details.php4
-rwxr-xr-xmod/profile/views/default/profile/profile_ownerblock.php4
-rw-r--r--mod/reportedcontent/add.php2
-rw-r--r--mod/tagcloud/views/default/widgets/tagcloud/view.php2
-rw-r--r--mod/thewire/index.php4
-rw-r--r--mod/thewire/start.php2
-rw-r--r--mod/thewire/views/default/widgets/thewire/view.php2
65 files changed, 107 insertions, 107 deletions
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'])){
<?php echo elgg_echo('access'); ?>
<?php
//if it is a group, pull out the group access view
- if(page_owner_entity() instanceof ElggGroup){
+ if(elgg_get_page_owner() instanceof ElggGroup){
$access_options = group_access_options($owner);
echo elgg_view('input/access', array('internalname' => '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));
?>
<div class="group_tool_widget bookmarks">
-<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/bookmarks/" . page_owner_entity()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span>
+<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/bookmarks/" . elgg_get_page_owner()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span>
<h3><?php echo elgg_echo('bookmarks:group') ?></h3>
<?php
if($bookmarks){
@@ -29,7 +29,7 @@ if($bookmarks){
echo "<div class='entity_listing clearfloat'>" . $info . "</div>";
}
} 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 "<p class='margin_top'><a href=\"{$create_bookmark}\">" . elgg_echo("bookmarks:new") . "</a></p>";
}
echo "</div>"; \ 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 "<div class='ContentWrapper bookmarks more'><a href=\"{$user_inbox}\">".elgg_echo('bookmarks:read')."</a></div>";
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']));
?>
<input type="hidden" name="context" value="<?php echo $context; ?>" />
-<input type="hidden" name="owner" value="<?php echo page_owner(); ?>" />
+<input type="hidden" name="owner" value="<?php echo elgg_get_page_owner_guid(); ?>" />
<input type="submit" value="<?php echo elgg_echo('save'); ?>" class="submit_button" />
</form>
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 "<p><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></p>";
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 .= "<div class='group_listings hide_comments'>".$river_items."</div>";
-$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 = "<div class='group_listings'>".$objects."</div>";
- $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 "<div class='entity_listing_info'>";
// 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 "<div class='entity_metadata'>";
echo "<span class='delete_button'>".elgg_view("output/confirmlink",array(
'href' => $vars['url'] . "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php
index d5e533f81..5c1f5a099 100644
--- a/mod/groups/views/default/forum/topics.php
+++ b/mod/groups/views/default/forum/topics.php
@@ -9,7 +9,7 @@
<h2><?php echo elgg_echo("groups:forum"); ?></h2>
</div>
<?php // only show the add topic button if the user is a member
- if(page_owner_entity()->isMember(get_loggedin_user())) {
+ if(elgg_get_page_owner()->isMember(get_loggedin_user())) {
?>
<div class="content_header_options">
<a class="action_button" href="<?php echo $vars['url']; ?>mod/groups/addtopic.php?group_guid=<?php echo $vars['group_guid']; ?>"><?php echo elgg_echo("groups:addtopic"); ?></a>
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 "<h3>" . elgg_echo("groups:topicisclosed") . "</h3>";
echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>";
- }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
*/
?>
-<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/groups/activity/" . page_owner(); ?>"><?php echo elgg_echo('link:view:all')?></a></span>
+<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/groups/activity/" . elgg_get_page_owner_guid(); ?>"><?php echo elgg_echo('link:view:all')?></a></span>
<h3><?php echo elgg_echo("activity"); ?></h3>
<?php
- $owner = page_owner_entity();
+ $owner = elgg_get_page_owner();
$group_guid = $owner->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'){
?>
-<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/groups/forum/" . page_owner(); ?>"><?php echo elgg_echo('link:view:all')?></a></span>
+<span class="group_widget_link"><a href="<?php echo $vars['url'] . "pg/groups/forum/" . elgg_get_page_owner_guid(); ?>"><?php echo elgg_echo('link:view:all')?></a></span>
<h3><?php echo elgg_echo('groups:latestdiscussion'); ?></h3>
<?php
@@ -23,8 +23,8 @@ if($vars['entity']->forum_enable != 'no'){
echo "</div>";
}
} 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 "<p class='margin_top'><a href=\"{$create_discussion}\">".elgg_echo("groups:addtopic")."</a></p>";
}else{
echo "<p class='margin_top'>". elgg_echo("grouptopic:notcreated") . "</p>";
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 .= "<p class='entity_title'>" . elgg_echo('groups:started') . " " . $topic_owner->name . ": <a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$group->guid}\">{$title}</a></p>";
- 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 .= "<div class='entity_metadata'>";
$info .= '<span class="entity_edit">' . elgg_view("output/url", array(
diff --git a/mod/members/index.php b/mod/members/index.php
index 30d6102e3..4bcdef0fd 100644
--- a/mod/members/index.php
+++ b/mod/members/index.php
@@ -8,7 +8,7 @@
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());
@@ -23,8 +23,8 @@ $filter = get_input("filter", "newest");
$tag = get_input('tag');
// friends links
-$area1 = "<ul class='submenu page_navigation'><li><a href=\"" . $CONFIG->wwwroot."pg/friends/" . page_owner_entity()->username . "\">". elgg_echo('friends') . "</a></li>";
-$area1 .= "<li><a href=\"" . $CONFIG->wwwroot."pg/friendsof/" . page_owner_entity()->username . "\">". elgg_echo('friends:of') . "</a></li>";
+$area1 = "<ul class='submenu page_navigation'><li><a href=\"" . $CONFIG->wwwroot."pg/friends/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends') . "</a></li>";
+$area1 .= "<li><a href=\"" . $CONFIG->wwwroot."pg/friendsof/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends:of') . "</a></li>";
$area1 .= "<li class='selected'><a href=\"" . $CONFIG->wwwroot."mod/members/index.php\">". elgg_echo('members:browse') . "</a></li>";
$area1 .= "</ul>";
diff --git a/mod/messageboard/index.php b/mod/messageboard/index.php
index 88438bb85..ff661ce9c 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 = get_entity(page_owner());
+$entity = elgg_get_page_owner();
// Get any annotations for their message board
$contents = $entity->getAnnotations('messageboard', 50, 0, 'desc');
diff --git a/mod/messageboard/views/default/messageboard/forms/add.php b/mod/messageboard/views/default/messageboard/forms/add.php
index b26527b06..ec61ebee7 100644
--- a/mod/messageboard/views/default/messageboard/forms/add.php
+++ b/mod/messageboard/views/default/messageboard/forms/add.php
@@ -14,7 +14,7 @@
<textarea name="message_content" value="" class="input_textarea"></textarea><br />
<!-- the page owner, this will be the profile owner -->
- <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" />
+ <input type="hidden" name="pageOwner" value="<?php echo elgg_get_page_owner_guid(); ?>" />
<?php echo elgg_view('input/securitytoken'); ?>
diff --git a/mod/messageboard/views/default/widgets/messageboard/view.php b/mod/messageboard/views/default/widgets/messageboard/view.php
index dde360961..223cbc007 100644
--- a/mod/messageboard/views/default/widgets/messageboard/view.php
+++ b/mod/messageboard/views/default/widgets/messageboard/view.php
@@ -8,7 +8,7 @@
*/
//get the full page owner entity
-$user = get_entity(page_owner());
+$user = elgg_get_page_owner();
//the number of message to display
$num_display = 5;
@@ -46,7 +46,7 @@ if (isloggedin()) {
<textarea name="message_content" class="input_textarea"></textarea>
<!-- the page owner, this will be the profile owner -->
- <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" class="pageOwner" />
+ <input type="hidden" name="pageOwner" value="<?php echo elgg_get_page_owner_guid(); ?>" class="pageOwner" />
<!-- submit button -->
<input type="submit" id="postit" value="<?php echo elgg_echo('messageboard:postit'); ?>">
diff --git a/mod/messages/send.php b/mod/messages/send.php
index 0435974ce..c0a59b289 100644
--- a/mod/messages/send.php
+++ b/mod/messages/send.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/pages/edit.php b/mod/pages/edit.php
index cc9955bc9..30207a7b9 100644
--- a/mod/pages/edit.php
+++ b/mod/pages/edit.php
@@ -15,7 +15,7 @@ if ($container = $pages->container_guid) {
set_page_owner($container);
}
-$page_owner = page_owner_entity();
+$page_owner = elgg_get_page_owner();
if ($page_owner === false || is_null($page_owner)) {
$page_owner = get_loggedin_user();
diff --git a/mod/pages/history.php b/mod/pages/history.php
index 06e877c42..dfbe3ab59 100644
--- a/mod/pages/history.php
+++ b/mod/pages/history.php
@@ -25,7 +25,7 @@ $offset = (int)get_input('offset');
$page_guid = get_input('page_guid');
$pages = get_entity($page_guid);
-add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
+add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
$title = $pages->title . ": " . elgg_echo("pages:history");
$content = elgg_view_title($title);
diff --git a/mod/pages/index.php b/mod/pages/index.php
index 2afae36df..50d11af1d 100644
--- a/mod/pages/index.php
+++ b/mod/pages/index.php
@@ -10,13 +10,13 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
global $CONFIG;
// Add menus
-$owner = page_owner_entity();
+$owner = elgg_get_page_owner();
if (!($owner instanceof ElggGroup)) {
- add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
+ add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php", 'pageslinksgeneral');
}
if (($owner instanceof ElggEntity) && (can_write_to_container(0,$owner->guid))){
- add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . page_owner(), 'pagesactions');
+ add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . elgg_get_page_owner_guid(), 'pagesactions');
add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/" . $owner->username, 'pagesactions');
}
@@ -38,7 +38,7 @@ $context = get_context();
set_context('search');
-$objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => page_owner(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
+$objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
set_context($context);
diff --git a/mod/pages/new.php b/mod/pages/new.php
index bf2640301..2003b183e 100644
--- a/mod/pages/new.php
+++ b/mod/pages/new.php
@@ -13,7 +13,7 @@ global $CONFIG;
if ($container = (int) get_input('container_guid')) {
set_page_owner($container);
}
-$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());
@@ -28,7 +28,7 @@ if(get_input('parent_guid')){
}
global $CONFIG;
-add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
+add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
$title = elgg_echo("pages:new");
$area2 .= elgg_view_title($title);
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 80c1607a2..3dcacd457 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -82,7 +82,7 @@ function pages_submenus() {
global $CONFIG;
- $page_owner = page_owner_entity();
+ $page_owner = elgg_get_page_owner();
// Group submenu option
if ($page_owner instanceof ElggGroup && get_context() == 'groups') {
@@ -310,8 +310,8 @@ function pages_write_permission_check($hook, $entity_type, $returnvalue, $params
function pages_container_permission_check($hook, $entity_type, $returnvalue, $params) {
if (get_context() == "pages") {
- if (page_owner()) {
- if (can_write_to_container(get_loggedin_userid(), page_owner())) return true;
+ if (elgg_get_page_owner_guid()) {
+ if (can_write_to_container(get_loggedin_userid(), elgg_get_page_owner_guid())) return true;
}
if ($page_guid = get_input('page_guid',0)) {
$entity = get_entity($page_guid);
diff --git a/mod/pages/view.php b/mod/pages/view.php
index 2efcf4f04..24684bff7 100644
--- a/mod/pages/view.php
+++ b/mod/pages/view.php
@@ -28,10 +28,10 @@ if ($container) {
}
global $CONFIG;
-// add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
+// add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
if ($pages->canEdit()) {
- add_submenu_item(elgg_echo('pages:newchild'),"{$CONFIG->wwwroot}pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . page_owner(), 'pagesactions');
+ add_submenu_item(elgg_echo('pages:newchild'),"{$CONFIG->wwwroot}pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . elgg_get_page_owner_guid(), 'pagesactions');
$delete_url = elgg_add_action_tokens_to_url("{$CONFIG->wwwroot}action/pages/delete?page={$pages->getGUID()}");
add_submenu_item(elgg_echo('pages:delete'), $delete_url, 'pagesactions', true);
}
@@ -44,7 +44,7 @@ if ($parent_page = get_entity(get_input("page_guid"))) {
$title = $pages->title;
// Breadcrumbs
-$body = elgg_view('pages/breadcrumbs', array('page_owner' => page_owner_entity(), 'parent' => $parent));
+$body = elgg_view('pages/breadcrumbs', array('page_owner' => elgg_get_page_owner(), 'parent' => $parent));
$body .= elgg_view_title($pages->title);
$body .= elgg_view_entity($pages, true);
diff --git a/mod/pages/views/default/forms/pages/edit.php b/mod/pages/views/default/forms/pages/edit.php
index bdd721b82..0d066bf80 100644
--- a/mod/pages/views/default/forms/pages/edit.php
+++ b/mod/pages/views/default/forms/pages/edit.php
@@ -8,7 +8,7 @@
$parent_guid = get_input('parent_guid');
$container_guid = get_input('container_guid');
if (!$container_guid) {
- $container_guid = page_owner();
+ $container_guid = elgg_get_page_owner_guid();
}
$new_page = false;
@@ -86,7 +86,7 @@ if ($container_guid) {
}
?>
<input type="hidden" name="parent_guid" value="<?php if (!$new_page) echo $vars['entity']->parent_guid; else echo $parent_guid; ?>" />
- <input type="hidden" name="owner_guid" value="<?php if (!$new_page) echo $vars['entity']->owner_guid; else echo page_owner(); ?>" />
+ <input type="hidden" name="owner_guid" value="<?php if (!$new_page) echo $vars['entity']->owner_guid; else echo elgg_get_page_owner_guid(); ?>" />
<input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
</p>
diff --git a/mod/pages/views/default/pages/groupprofile_pages.php b/mod/pages/views/default/pages/groupprofile_pages.php
index 17c1d87ed..8069cdd8b 100644
--- a/mod/pages/views/default/pages/groupprofile_pages.php
+++ b/mod/pages/views/default/pages/groupprofile_pages.php
@@ -13,7 +13,7 @@ if ($vars['entity']->pages_enable != 'no') {
<h2><?php echo elgg_echo("pages:groupprofile"); ?></h2>
<?php
- $objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => page_owner(), 'limit' => 5, 'full_view' => FALSE));
+ $objects = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => 5, 'full_view' => FALSE));
if($objects)
echo $objects;
diff --git a/mod/pages/views/default/widgets/pages/view.php b/mod/pages/views/default/widgets/pages/view.php
index 9d5a89aea..d51fd008a 100644
--- a/mod/pages/views/default/widgets/pages/view.php
+++ b/mod/pages/views/default/widgets/pages/view.php
@@ -17,10 +17,10 @@ if (!$num_display) {
$num_display = 4;
}
-$pages = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => page_owner(), 'limit' => $num_display, 'full_view' => FALSE));
+$pages = elgg_list_entities(array('types' => 'object', 'subtypes' => 'page_top', 'container_guid' => elgg_get_page_owner_guid(), 'limit' => $num_display, 'full_view' => FALSE));
if ($pages) {
- $pagesurl = $vars['url'] . "pg/pages/owned/" . page_owner_entity()->username;
+ $pagesurl = $vars['url'] . "pg/pages/owned/" . elgg_get_page_owner()->username;
$pages .= "<div class=\"pages_widget_singleitem_more\"><a href=\"{$pagesurl}\">" . elgg_echo('pages:more') . "</a></div>";
}
diff --git a/mod/pages/welcome.php b/mod/pages/welcome.php
index 10628b175..759114965 100644
--- a/mod/pages/welcome.php
+++ b/mod/pages/welcome.php
@@ -15,7 +15,7 @@ if ($container = (int) get_input('container_guid')) {
set_page_owner($container);
}
-$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());
@@ -24,7 +24,7 @@ if ($page_owner === false || is_null($page_owner)) {
//get the owners welcome message if it exists
$welcome_message = elgg_get_entities(array('types' => 'object', 'subtypes' => 'pages_welcome', 'container_guid' => $page_owner->getGUID(), 'limit' => 1));
global $CONFIG;
-add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
+add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
$title = elgg_echo("pages:welcome");
$area2 .= elgg_view_title($title);
diff --git a/mod/pages/world.php b/mod/pages/world.php
index 8a8ede68d..0b411b8b2 100644
--- a/mod/pages/world.php
+++ b/mod/pages/world.php
@@ -10,7 +10,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
global $CONFIG;
// 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']);
@@ -21,7 +21,7 @@ if (($page_owner instanceof ElggEntity) && ($page_owner->canWriteToContainer()))
}
if(isloggedin()) {
- add_submenu_item(sprintf(elgg_echo("pages:user"), page_owner_entity()->name), $CONFIG->url . "pg/pages/owned/" . page_owner_entity()->username, 'pageslinksgeneral');
+ add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
}
add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php", 'pageslinksgeneral');
@@ -29,7 +29,7 @@ add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php",
$limit = get_input("limit", 10);
$offset = get_input("offset", 0);
-$title = sprintf(elgg_echo("pages:all"),page_owner_entity()->name);
+$title = sprintf(elgg_echo("pages:all"),elgg_get_page_owner()->name);
// Get objects
$context = get_context();
diff --git a/mod/profile/edit.php b/mod/profile/edit.php
index 2b09c7ff8..97b656a5c 100644
--- a/mod/profile/edit.php
+++ b/mod/profile/edit.php
@@ -15,7 +15,7 @@ if (!isloggedin()) {
}
// Get owner of profile - set in page handler
-$user = page_owner_entity();
+$user = elgg_get_page_owner();
if (!$user) {
register_error(elgg_echo("profile:notfound"));
forward();
diff --git a/mod/profile/editicon.php b/mod/profile/editicon.php
index 2b1a40d0f..9b0a654d2 100644
--- a/mod/profile/editicon.php
+++ b/mod/profile/editicon.php
@@ -14,7 +14,7 @@ if (!isloggedin()) {
}
// Get owner of profile - set in page handler
-$user = page_owner_entity();
+$user = elgg_get_page_owner();
if (!$user) {
register_error(elgg_echo("profile:notfound"));
forward();
diff --git a/mod/profile/icon.php b/mod/profile/icon.php
index b7b4f921c..48ccc16c2 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 = page_owner_entity();
+$user = elgg_get_page_owner();
// Get the size
$size = strtolower(get_input('size'));
diff --git a/mod/profile/start.php b/mod/profile/start.php
index 48547c0bf..d1840babb 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -174,7 +174,7 @@ function profile_pagesetup()
//add submenu options
if (get_context() == "profile") {
- $page_owner = page_owner_entity();
+ $page_owner = elgg_get_page_owner();
if ($page_owner && $page_owner->canEdit()) {
add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/details");
add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/icon");
diff --git a/mod/profile/views/default/profile/admin_menu.php b/mod/profile/views/default/profile/admin_menu.php
index a33910309..a896a0ace 100755
--- a/mod/profile/views/default/profile/admin_menu.php
+++ b/mod/profile/views/default/profile/admin_menu.php
@@ -5,8 +5,8 @@
global $CONFIG;
if (isadminloggedin()){
- if ($_SESSION['id']!=page_owner()){
- $user = get_user(page_owner());
+ if ($_SESSION['id']!=elgg_get_page_owner_guid()){
+ $user = get_user(elgg_get_page_owner_guid());
$url = $vars['url'];
$ts = time();
$token = generate_action_token($ts);
diff --git a/mod/profile/views/default/profile/commentwall/commentwalladd.php b/mod/profile/views/default/profile/commentwall/commentwalladd.php
index f5bd1bdce..0491925c6 100644
--- a/mod/profile/views/default/profile/commentwall/commentwalladd.php
+++ b/mod/profile/views/default/profile/commentwall/commentwalladd.php
@@ -10,7 +10,7 @@
<!-- the person posting an item on the message board -->
<input type="hidden" name="guid" value="<?php echo $_SESSION['guid']; ?>" />
<!-- the page owner, this will be the profile owner -->
- <input type="hidden" name="pageOwner" value="<?php echo page_owner(); ?>" />
+ <input type="hidden" name="pageOwner" value="<?php echo elgg_get_page_owner_guid(); ?>" />
<?php echo elgg_view('input/securitytoken'); ?>
<!-- submit messages input -->
<input type="submit" id="postit" value="<?php echo elgg_echo('profile:commentwall:add'); ?>">
diff --git a/mod/profile/views/default/profile/edit.php b/mod/profile/views/default/profile/edit.php
index 045436da4..310536527 100644
--- a/mod/profile/views/default/profile/edit.php
+++ b/mod/profile/views/default/profile/edit.php
@@ -14,7 +14,7 @@
<p><label>
<?php echo elgg_echo('user:name:label'); ?></label>
<?php
- echo elgg_view('input/text',array('internalname' => 'name', 'value' => page_owner_entity()->name));
+ echo elgg_view('input/text',array('internalname' => 'name', 'value' => elgg_get_page_owner()->name));
?>
</p>
@@ -73,7 +73,7 @@
?>
<p>
- <input type="hidden" name="username" value="<?php echo page_owner_entity()->username; ?>" />
+ <input type="hidden" name="username" value="<?php echo elgg_get_page_owner()->username; ?>" />
<input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" />
</p>
diff --git a/mod/profile/views/default/profile/listing.php b/mod/profile/views/default/profile/listing.php
index 404d123c8..6dc8e0948 100644
--- a/mod/profile/views/default/profile/listing.php
+++ b/mod/profile/views/default/profile/listing.php
@@ -18,9 +18,9 @@ $banned = $vars['entity']->isBanned();
// Simple XFN
$rel = "";
-if (page_owner() == $vars['entity']->guid)
+if (elgg_get_page_owner_guid() == $vars['entity']->guid)
$rel = 'me';
-else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid))
+else if (check_entity_relationship(elgg_get_page_owner_guid(), 'friend', $vars['entity']->guid))
$rel = 'friend';
if (!$banned) {
diff --git a/mod/profile/views/default/profile/metatags.php b/mod/profile/views/default/profile/metatags.php
index e67d19c04..a90b12494 100644
--- a/mod/profile/views/default/profile/metatags.php
+++ b/mod/profile/views/default/profile/metatags.php
@@ -6,6 +6,6 @@
*
*/
-if ($owner = page_owner_entity()) { ?>
+if ($owner = elgg_get_page_owner()) { ?>
<link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo full_url(); ?>?view=foaf" />
<?php } ?> \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_contents/details.php b/mod/profile/views/default/profile/profile_contents/details.php
index 6a214557d..360ea0f9e 100755
--- a/mod/profile/views/default/profile/profile_contents/details.php
+++ b/mod/profile/views/default/profile/profile_contents/details.php
@@ -6,9 +6,9 @@
// Simple XFN
$rel = "";
-if (page_owner() == $vars['entity']->guid) {
+if (elgg_get_page_owner_guid() == $vars['entity']->guid) {
$rel = 'me';
-} else if (check_entity_relationship(page_owner(), 'friend', $vars['entity']->guid)) {
+} else if (check_entity_relationship(elgg_get_page_owner_guid(), 'friend', $vars['entity']->guid)) {
$rel = 'friend';
}
diff --git a/mod/profile/views/default/profile/profile_ownerblock.php b/mod/profile/views/default/profile/profile_ownerblock.php
index 58386fc04..57c1dfb8b 100755
--- a/mod/profile/views/default/profile/profile_ownerblock.php
+++ b/mod/profile/views/default/profile/profile_ownerblock.php
@@ -12,7 +12,7 @@ if ($vars['entity']) {
$user = get_entity($vars['entity']->guid);
}
} else {
- $user = page_owner_entity();
+ $user = elgg_get_page_owner();
}
if (!$user) {
// no user so we quit view
@@ -36,7 +36,7 @@ if ($section == 'details') {
$more_info .= "</div>";
}
$profile_actions = "";
-if (isloggedin() && (get_loggedin_userid() == page_owner())) {
+if (isloggedin() && (get_loggedin_userid() == elgg_get_page_owner_guid())) {
$profile_actions = "<div class='clearfloat profile_actions'>";
$profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/details' class='action_button'>". elgg_echo('profile:edit') ."</a>";
$profile_actions .= "<a href='{$vars['url']}pg/profile/{$user->username}/edit/icon' class='action_button'>". elgg_echo('profile:editicon') ."</a>";
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 "<div class=\"shares_widget_wrapper\"><a href=\"{$blogurl}\">".elgg_echo('thewire:moreposts')."</a></div>";
}