diff options
-rw-r--r-- | mod/blog/start.php | 2 | ||||
-rw-r--r-- | mod/groups/start.php | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php index 0a07b3ced..d18f011c5 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -198,7 +198,7 @@ function blog_ecml_views_hook($hook, $entity_type, $return_value, $params) { function blog_profile_menu($hook, $entity_type, $return_value, $params) { global $CONFIG; - if (get_context() != 'groups') { + if (!($params['owner'] instanceof ElggGroup)) { $return_value[] = array( 'text' => elgg_echo('blog'), 'href' => "{$CONFIG->url}pg/blog/{$params['owner']->username}/read", diff --git a/mod/groups/start.php b/mod/groups/start.php index d158b47d0..fdf3b9e45 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -593,12 +593,10 @@ function forum_profile_menu($hook, $entity_type, $return_value, $params) { global $CONFIG; - $group_owner = page_owner_entity(); - - if ($group_owner instanceof ElggGroup && get_context() == 'groups' && $group_owner->forum_enable != "no") { + if ($params['owner'] instanceof ElggGroup && $group_owner->forum_enable != 'no') { $return_value[] = array( 'text' => elgg_echo('groups:forum'), - 'href' => "{$CONFIG->url}pg/groups/forum/{$group_owner->getGUID()}" + 'href' => "{$CONFIG->url}pg/groups/forum/{$params['owner']->getGUID()}" ); } return $return_value; |