]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Updated group forum link to only appear in group ownerblock, and when group forum...
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 24 May 2010 12:31:40 +0000 (12:31 +0000)
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 24 May 2010 12:31:40 +0000 (12:31 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@6163 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/groups/start.php

index 07b2d9d71dd0ef23e998950de2420919c292b935..d158b47d03eb59b0edb75af409b3a2c23f9b5f7c 100644 (file)
                                                }
                                        }
                                }
-
-                               if($page_owner->forum_enable != "no"){
-                                       //add_submenu_item(elgg_echo('groups:forum'),$CONFIG->wwwroot . "pg/groups/forum/{$page_owner->getGUID()}/", '1groupslinks');
-                               }
-
                        }
 
                // Add submenu options
                
                $group_owner = page_owner_entity();
                
-               $return_value[] = array(
-                       'text' => elgg_echo('groups:forum'),
-                       'href' => "{$CONFIG->url}pg/groups/forum/{$group_owner->getGUID()}"
-               );
-               
+               if ($group_owner instanceof ElggGroup && get_context() == 'groups' && $group_owner->forum_enable != "no") {
+                       $return_value[] = array(
+                               'text' => elgg_echo('groups:forum'),
+                               'href' => "{$CONFIG->url}pg/groups/forum/{$group_owner->getGUID()}"
+                       );
+               }
                return $return_value;
        }