]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Ensuring Blogs and Forum links display properly in the group ownerblock.
authornickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 26 May 2010 15:11:20 +0000 (15:11 +0000)
committernickw <nickw@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 26 May 2010 15:11:20 +0000 (15:11 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6230 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/blog/start.php
mod/groups/start.php

index 0a07b3ceda9fd0d01021a8a735af513b23b83c72..d18f011c5b7547079a414df280e0ad46ce009a68 100644 (file)
@@ -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",
index d158b47d03eb59b0edb75af409b3a2c23f9b5f7c..fdf3b9e458b8051248d4029495c7f26883e011ac 100644 (file)
        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;