From de9d2ad77face238042f78c4c71273bb98e7f398 Mon Sep 17 00:00:00 2001 From: pete Date: Mon, 24 May 2010 12:31:40 +0000 Subject: Updated group forum link to only appear in group ownerblock, and when group forum is enabled. git-svn-id: http://code.elgg.org/elgg/trunk@6163 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/start.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'mod/groups/start.php') diff --git a/mod/groups/start.php b/mod/groups/start.php index 07b2d9d71..d158b47d0 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -224,11 +224,6 @@ } } } - - 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 @@ -600,11 +595,12 @@ $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; } -- cgit v1.2.3