diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/group.php | 2 | ||||
-rw-r--r-- | engine/lib/pageowner.php | 22 | ||||
-rw-r--r-- | engine/lib/users.php | 4 | ||||
-rw-r--r-- | engine/lib/widgets.php | 2 |
4 files changed, 14 insertions, 16 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); } |