aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 12:31:40 +0000
committerpete <pete@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-05-24 12:31:40 +0000
commitde9d2ad77face238042f78c4c71273bb98e7f398 (patch)
treeb4e13c0cd33405a575663c430c0ebbf4f4201b6f /mod
parent1e5e8c0da598191a49f490a68fe9842b90423e42 (diff)
downloadelgg-de9d2ad77face238042f78c4c71273bb98e7f398.tar.gz
elgg-de9d2ad77face238042f78c4c71273bb98e7f398.tar.bz2
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
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/start.php16
1 files changed, 6 insertions, 10 deletions
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;
}