aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 12:43:28 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-01-26 12:43:28 +0000
commit0cc190deb5ec0c9608255192c042f573fd834019 (patch)
tree4cd2d31d33109d268ac595140375b604f1399276
parent5c8493c1456bb656dd4c6448fb0edde7af81b325 (diff)
downloadelgg-0cc190deb5ec0c9608255192c042f573fd834019.tar.gz
elgg-0cc190deb5ec0c9608255192c042f573fd834019.tar.bz2
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
-rw-r--r--engine/lib/group.php2
-rw-r--r--engine/lib/pageowner.php22
-rw-r--r--engine/lib/users.php4
-rw-r--r--engine/lib/widgets.php2
-rw-r--r--mod/blog/views/default/blog/group_module.php2
-rw-r--r--mod/blog/views/default/blog/sidebar/archives.php2
-rw-r--r--mod/blog/views/default/blog/sidebar/tagcloud.php2
-rw-r--r--mod/blog/views/default/widgets/blog/content.php2
-rw-r--r--mod/bookmarks/bookmarklet.php2
-rw-r--r--mod/bookmarks/start.php6
-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.php4
-rw-r--r--mod/bookmarks/views/default/widgets/bookmarks/view.php2
-rw-r--r--mod/defaultwidgets/views/default/defaultwidgets/editor.php2
-rw-r--r--mod/file/friends.php2
-rw-r--r--mod/file/index.php2
-rw-r--r--mod/file/search.php2
-rw-r--r--mod/file/upload.php2
-rw-r--r--mod/file/view.php2
-rw-r--r--mod/file/views/default/file/group_module.php2
-rw-r--r--mod/file/views/default/widgets/filerepo/content.php2
-rw-r--r--mod/groups/lib/groups.php6
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/content.php2
-rw-r--r--mod/messageboard/index.php2
-rw-r--r--mod/messageboard/views/default/widgets/messageboard/content.php2
-rw-r--r--mod/messages/inbox.php2
-rw-r--r--mod/messages/read.php2
-rw-r--r--mod/messages/sent.php2
-rw-r--r--mod/pages/friends.php2
-rw-r--r--mod/pages/index.php2
-rw-r--r--mod/pages/revision.php2
-rw-r--r--mod/pages/view.php2
-rw-r--r--mod/pages/views/default/pages/group_module.php2
-rw-r--r--mod/pages/views/default/pages/sidebar/navigation.php2
-rw-r--r--mod/pages/views/default/widgets/pages/content.php2
-rw-r--r--mod/profile/icon.php2
-rw-r--r--mod/profile/views/default/profile/details.php2
-rw-r--r--mod/profile/views/default/profile/metatags.php2
-rwxr-xr-xmod/profile/views/default/profile/owner_block.php4
-rw-r--r--mod/thewire/index.php2
-rw-r--r--mod/thewire/views/default/widgets/thewire/content.php2
-rw-r--r--pages/avatar/edit.php4
-rw-r--r--pages/avatar/view.php2
-rw-r--r--pages/friends/index.php2
-rw-r--r--pages/friends/of.php2
-rw-r--r--pages/friends/pickercallback.php2
-rw-r--r--pages/profile/edit.php2
-rw-r--r--pages/settings/account.php2
-rw-r--r--pages/settings/statistics.php2
-rw-r--r--pages/settings/tools.php2
-rw-r--r--views/default/core/settings/account/default_access.php2
-rw-r--r--views/default/core/settings/account/email.php2
-rw-r--r--views/default/core/settings/account/language.php2
-rw-r--r--views/default/core/settings/account/name.php2
-rw-r--r--views/default/core/settings/account/password.php2
-rw-r--r--views/default/js/initialize_elgg.php2
-rw-r--r--views/default/layout/elements/owner_block.php2
-rw-r--r--views/default/layout/shells/content/header.php2
-rw-r--r--views/default/layout/shells/widgets.php2
-rw-r--r--views/default/page/elements/content_header.php2
-rw-r--r--views/default/page/elements/content_header_member.php4
-rw-r--r--views/foaf/page/shells/default.php2
63 files changed, 83 insertions, 85 deletions
diff --git a/engine/lib/group.php b/engine/lib/group.php
index 1f2099dcd..e69ae6070 100644
--- a/engine/lib/group.php
+++ b/engine/lib/group.php
@@ -620,7 +620,7 @@ function group_gatekeeper($forward = true) {
$allowed = true;
$url = '';
- if ($group = elgg_get_page_owner()) {
+ if ($group = elgg_get_page_owner_entity()) {
if ($group instanceof ElggGroup) {
$url = $group->getURL();
if (
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index 649e77e40..efe28960d 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -13,7 +13,7 @@
* @param int $guid Optional parameter used by elgg_set_page_owner_guid().
*
* @return int The current page owner guid (0 if none).
- * @since 1.8
+ * @since 1.8.0
*/
function elgg_get_page_owner_guid($guid = 0) {
static $page_owner_guid;
@@ -50,9 +50,9 @@ function page_owner() {
*
* @return ElggEntity|false The current page owner or false if none.
*
- * @since 1.8
+ * @since 1.8.0
*/
-function elgg_get_page_owner() {
+function elgg_get_page_owner_entity() {
$guid = elgg_get_page_owner_guid();
if ($guid > 0) {
return get_entity($guid);
@@ -66,12 +66,10 @@ function elgg_get_page_owner() {
*
* @deprecated 1.8 Use elgg_get_page_owner()
* @return ElggEntity|false The current page owner or false if none.
- *
- * @since 1.8
*/
function page_owner_entity() {
elgg_deprecated_notice('page_owner_entity() was deprecated by elgg_get_page_owner().', 1.8);
- return elgg_get_page_owner();
+ return elgg_get_page_owner_entity();
}
/**
@@ -79,7 +77,7 @@ function page_owner_entity() {
*
* @param int $guid The guid of the page owner
*
- * @since 1.8
+ * @since 1.8.0
*/
function elgg_set_page_owner_guid($guid) {
elgg_get_page_owner_guid($guid);
@@ -173,7 +171,7 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params)
*
* @param string $context The context of the page
* @return bool
- * @since 1.8
+ * @since 1.8.0
*/
function elgg_set_context($context) {
global $CONFIG;
@@ -198,7 +196,7 @@ function elgg_set_context($context) {
* Since context is a stack, this is equivalent to a peek.
*
* @return string|NULL
- * @since 1.8
+ * @since 1.8.0
*/
function elgg_get_context() {
global $CONFIG;
@@ -210,7 +208,7 @@ function elgg_get_context() {
* Push a context onto the top of the stack
*
* @param string $context The context string to add to the context stack
- * @since 1.8
+ * @since 1.8.0
*/
function elgg_push_context($context) {
global $CONFIG;
@@ -222,7 +220,7 @@ function elgg_push_context($context) {
* Removes and returns the top context string from the stack
*
* @return string|NULL
- * @since 1.8
+ * @since 1.8.0
*/
function elgg_pop_context() {
global $CONFIG;
@@ -240,7 +238,7 @@ function elgg_pop_context() {
*
* @param string $context The context string to check for
* @return bool
- * @since 1.8
+ * @since 1.8.0
*/
function elgg_in_context($context) {
global $CONFIG;
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 8d00eee2f..ab83da699 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -1682,7 +1682,7 @@ function users_pagesetup() {
$params = array(
'name' => 'friends',
'title' => elgg_echo('friends'),
- 'url' => 'pg/friends/' . elgg_get_page_owner()->username,
+ 'url' => 'pg/friends/' . elgg_get_page_owner_entity()->username,
'contexts' => array('friends')
);
elgg_register_menu_item('page', $params);
@@ -1690,7 +1690,7 @@ function users_pagesetup() {
$params = array(
'name' => 'friendsof',
'title' => elgg_echo('friends:of'),
- 'url' => 'pg/friendsof/' . elgg_get_page_owner()->username,
+ 'url' => 'pg/friendsof/' . elgg_get_page_owner_entity()->username,
'contexts' => array('friends')
);
elgg_register_menu_item('page', $params);
diff --git a/engine/lib/widgets.php b/engine/lib/widgets.php
index 9a092e92d..46dedcea1 100644
--- a/engine/lib/widgets.php
+++ b/engine/lib/widgets.php
@@ -117,7 +117,7 @@ function elgg_can_edit_widget_layout($context, $user_guid = 0) {
$params = array(
'user' => $user,
'context' => $context,
- 'page_owner' => elgg_get_page_owner()
+ 'page_owner' => elgg_get_page_owner_entity()
);
return elgg_trigger_plugin_hook('permissions_check', 'widget_layout', $params, $return);
}
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'])){
<?php echo elgg_echo('access'); ?>
<?php
//if it is a group, pull out the group access view
- if(elgg_get_page_owner() instanceof ElggGroup){
+ if(elgg_get_page_owner_entity() 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 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));
?>
<div class="group_tool_widget bookmarks">
-<span class="group_widget_link"><a href="<?php echo elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner()->username; ?>"><?php echo elgg_echo('link:view:all')?></a></span>
+<span class="group_widget_link"><a href="<?php echo elgg_get_site_url() . "pg/bookmarks/" . elgg_get_page_owner_entity()->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 clearfix'>" . $info . "</div>";
}
} 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 "<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 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 "<div class='ContentWrapper bookmarks more'><a href=\"{$user_inbox}\">" . elgg_echo('bookmarks:read') . "</a></div>";
}
} 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()) {
?>
<link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php echo full_url(); ?>?view=foaf" />
<?php
diff --git a/mod/profile/views/default/profile/owner_block.php b/mod/profile/views/default/profile/owner_block.php
index acff5c2d4..4edcec8d1 100755
--- a/mod/profile/views/default/profile/owner_block.php
+++ b/mod/profile/views/default/profile/owner_block.php
@@ -3,7 +3,7 @@
* Profile owner block
*/
-$user = elgg_get_page_owner();
+$user = elgg_get_page_owner_entity();
if (!$user) {
// no user so we quit view
@@ -49,7 +49,7 @@ if (isadminloggedin() && get_loggedin_userid() != elgg_get_page_owner_guid()) {
// content links
$content_menu = elgg_view_menu('owner_block', array(
- '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 "<div class=\"shares_widget_wrapper\"><a href=\"{$blogurl}\">".elgg_echo('thewire:moreposts')."</a></div>";
}
diff --git a/pages/avatar/edit.php b/pages/avatar/edit.php
index 5e44eb4b0..eef8f8f8b 100644
--- a/pages/avatar/edit.php
+++ b/pages/avatar/edit.php
@@ -10,8 +10,8 @@ elgg_set_context('profile_edit');
$title = elgg_echo('avatar:edit');
-$content = elgg_view('core/avatar/upload', array('entity' => elgg_get_page_owner()));
-$content .= elgg_view('core/avatar/crop', array('entity' => elgg_get_page_owner()));
+$content = elgg_view('core/avatar/upload', array('entity' => elgg_get_page_owner_entity()));
+$content .= elgg_view('core/avatar/crop', array('entity' => elgg_get_page_owner_entity()));
$params = array(
'content' => $content,
diff --git a/pages/avatar/view.php b/pages/avatar/view.php
index 8b420c61a..55ae00e16 100644
--- a/pages/avatar/view.php
+++ b/pages/avatar/view.php
@@ -3,7 +3,7 @@
* View an avatar
*/
-$user = elgg_get_page_owner();
+$user = elgg_get_page_owner_entity();
// Get the size
$size = strtolower(get_input('size'));
diff --git a/pages/friends/index.php b/pages/friends/index.php
index a8e5f7e8e..84c0fa526 100644
--- a/pages/friends/index.php
+++ b/pages/friends/index.php
@@ -6,7 +6,7 @@
* @subpackage Core
*/
-$owner = elgg_get_page_owner();
+$owner = elgg_get_page_owner_entity();
if (!$owner) {
// unknown user so send away (@todo some sort of 404 error)
forward();
diff --git a/pages/friends/of.php b/pages/friends/of.php
index 395334ff5..7091c4445 100644
--- a/pages/friends/of.php
+++ b/pages/friends/of.php
@@ -6,7 +6,7 @@
* @subpackage Core
*/
-$owner = elgg_get_page_owner();
+$owner = elgg_get_page_owner_entity();
if (!$owner) {
// unknown user so send away (@todo some sort of 404 error)
forward();
diff --git a/pages/friends/pickercallback.php b/pages/friends/pickercallback.php
index 1ca29ede9..4659ea150 100644
--- a/pages/friends/pickercallback.php
+++ b/pages/friends/pickercallback.php
@@ -23,7 +23,7 @@ if (!$members) {
$friendspicker = (int) get_input('friendspicker', 0);
// Get page owner (bomb out if there isn't one)
-$pageowner = elgg_get_page_owner();
+$pageowner = elgg_get_page_owner_entity();
if (!$pageowner) {
forward();
exit;
diff --git a/pages/profile/edit.php b/pages/profile/edit.php
index 64ffd7dc5..0ffb8783f 100644
--- a/pages/profile/edit.php
+++ b/pages/profile/edit.php
@@ -5,7 +5,7 @@
gatekeeper();
-$user = elgg_get_page_owner();
+$user = elgg_get_page_owner_entity();
if (!$user) {
register_error(elgg_echo("profile:notfound"));
forward();
diff --git a/pages/settings/account.php b/pages/settings/account.php
index 88e916658..2d3edd695 100644
--- a/pages/settings/account.php
+++ b/pages/settings/account.php
@@ -10,7 +10,7 @@
gatekeeper();
// Make sure we don't open a security hole ...
-if ((!elgg_get_page_owner()) || (!elgg_get_page_owner()->canEdit())) {
+if ((!elgg_get_page_owner_entity()) || (!elgg_get_page_owner_entity()->canEdit())) {
set_page_owner(get_loggedin_userid());
}
diff --git a/pages/settings/statistics.php b/pages/settings/statistics.php
index 2c9c32190..5cb935e07 100644
--- a/pages/settings/statistics.php
+++ b/pages/settings/statistics.php
@@ -10,7 +10,7 @@
gatekeeper();
// Make sure we don't open a security hole ...
-if ((!elgg_get_page_owner()) || (!elgg_get_page_owner()->canEdit())) {
+if ((!elgg_get_page_owner_entity()) || (!elgg_get_page_owner_entity()->canEdit())) {
set_page_owner(get_loggedin_userid());
}
diff --git a/pages/settings/tools.php b/pages/settings/tools.php
index e1c247581..ec0786c17 100644
--- a/pages/settings/tools.php
+++ b/pages/settings/tools.php
@@ -10,7 +10,7 @@
gatekeeper();
// Make sure we don't open a security hole ...
-if ((!elgg_get_page_owner()) || (!elgg_get_page_owner()->canEdit())) {
+if ((!elgg_get_page_owner_entity()) || (!elgg_get_page_owner_entity()->canEdit())) {
set_page_owner(get_loggedin_userid());
}
diff --git a/views/default/core/settings/account/default_access.php b/views/default/core/settings/account/default_access.php
index 3fbf3d32d..678a68ba1 100644
--- a/views/default/core/settings/account/default_access.php
+++ b/views/default/core/settings/account/default_access.php
@@ -6,7 +6,7 @@
* @subpackage Core
*/
if ($vars['config']->allow_user_default_access) {
- $user = elgg_get_page_owner();
+ $user = elgg_get_page_owner_entity();
if ($user) {
if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
diff --git a/views/default/core/settings/account/email.php b/views/default/core/settings/account/email.php
index b0d69eb82..1222a46ef 100644
--- a/views/default/core/settings/account/email.php
+++ b/views/default/core/settings/account/email.php
@@ -6,7 +6,7 @@
* @subpackage Core
*/
-$user = elgg_get_page_owner();
+$user = elgg_get_page_owner_entity();
if ($user) {
?>
diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php
index 45d121c15..bac22fe34 100644
--- a/views/default/core/settings/account/language.php
+++ b/views/default/core/settings/account/language.php
@@ -7,7 +7,7 @@
*/
global $CONFIG;
-$user = elgg_get_page_owner();
+$user = elgg_get_page_owner_entity();
if ($user) {
?>
diff --git a/views/default/core/settings/account/name.php b/views/default/core/settings/account/name.php
index fad6c488f..22f950925 100644
--- a/views/default/core/settings/account/name.php
+++ b/views/default/core/settings/account/name.php
@@ -8,7 +8,7 @@
*/
-$user = elgg_get_page_owner();
+$user = elgg_get_page_owner_entity();
// all hidden, but necessary for properly updating user details
echo elgg_view('input/hidden', array('internalname' => 'name', 'value' => $user->name));
diff --git a/views/default/core/settings/account/password.php b/views/default/core/settings/account/password.php
index 8e200754e..524cc0ce0 100644
--- a/views/default/core/settings/account/password.php
+++ b/views/default/core/settings/account/password.php
@@ -6,7 +6,7 @@
* @subpackage Core
*/
-$user = elgg_get_page_owner();
+$user = elgg_get_page_owner_entity();
if ($user) {
?>
diff --git a/views/default/js/initialize_elgg.php b/views/default/js/initialize_elgg.php
index 03d5adc5a..7634851f5 100644
--- a/views/default/js/initialize_elgg.php
+++ b/views/default/js/initialize_elgg.php
@@ -14,7 +14,7 @@ elgg.security.token.__elgg_ts = <?php echo $ts = time(); ?>;
elgg.security.token.__elgg_token = '<?php echo generate_action_token($ts); ?>';
<?php
-$page_owner = elgg_get_page_owner();
+$page_owner = elgg_get_page_owner_entity();
if ($page_owner instanceof ElggEntity) {
$page_owner_json = array();
diff --git a/views/default/layout/elements/owner_block.php b/views/default/layout/elements/owner_block.php
index 862b0b5a6..6ec4ebabe 100644
--- a/views/default/layout/elements/owner_block.php
+++ b/views/default/layout/elements/owner_block.php
@@ -11,7 +11,7 @@
elgg_push_context('owner_block');
// groups and other users get owner block
-$owner = elgg_get_page_owner();
+$owner = elgg_get_page_owner_entity();
if ($owner instanceof ElggGroup ||
($owner instanceof ElggUser && $owner->getGUID() != get_loggedin_userid())) {
diff --git a/views/default/layout/shells/content/header.php b/views/default/layout/shells/content/header.php
index 029794408..2b2d748a8 100644
--- a/views/default/layout/shells/content/header.php
+++ b/views/default/layout/shells/content/header.php
@@ -26,7 +26,7 @@ if ($context) {
$buttons = $vars['buttons'];
} else {
if (isloggedin() && $context) {
- $owner = elgg_get_page_owner();
+ $owner = elgg_get_page_owner_entity();
if (elgg_instanceof($owner, 'group')) {
$guid = $owner->getGUID();
} else {
diff --git a/views/default/layout/shells/widgets.php b/views/default/layout/shells/widgets.php
index f47c90f03..f6df67681 100644
--- a/views/default/layout/shells/widgets.php
+++ b/views/default/layout/shells/widgets.php
@@ -15,7 +15,7 @@ $show_add_widgets = elgg_get_array_value('show_add_widgets', $vars, true);
$exact_match = elgg_get_array_value('exact_match', $vars, false);
$show_access = elgg_get_array_value('show_access', $vars, true);
-$owner = elgg_get_page_owner();
+$owner = elgg_get_page_owner_entity();
$context = elgg_get_context();
elgg_push_context('widgets');
diff --git a/views/default/page/elements/content_header.php b/views/default/page/elements/content_header.php
index 8c0e01c57..6383c2f18 100644
--- a/views/default/page/elements/content_header.php
+++ b/views/default/page/elements/content_header.php
@@ -17,7 +17,7 @@
* @subpackage Core
*/
-$page_owner = elgg_get_page_owner();
+$page_owner = elgg_get_page_owner_entity();
$logged_in_user = get_loggedin_user();
$username = $logged_in_user->username;
diff --git a/views/default/page/elements/content_header_member.php b/views/default/page/elements/content_header_member.php
index 3d8fff0c0..4f21cbcce 100644
--- a/views/default/page/elements/content_header_member.php
+++ b/views/default/page/elements/content_header_member.php
@@ -8,8 +8,8 @@
*
*/
-$page_owner = elgg_get_page_owner();
-$name = elgg_get_page_owner()->name;
+$page_owner = elgg_get_page_owner_entity();
+$name = elgg_get_page_owner_entity()->name;
// get the object type
$type = $vars['type'];
diff --git a/views/foaf/page/shells/default.php b/views/foaf/page/shells/default.php
index 7bd69b875..1cd0ed82e 100644
--- a/views/foaf/page/shells/default.php
+++ b/views/foaf/page/shells/default.php
@@ -12,7 +12,7 @@ header("Content-Type: text/xml");
echo "<?xml version='1.0'?>\n";
-if (!$owner = elgg_get_page_owner()) {
+if (!$owner = elgg_get_page_owner_entity()) {
if (!isloggedin()) {
exit;
} else {