aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/start.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/start.php')
-rw-r--r--mod/groups/start.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 1b5b03ce7..09362cbbc 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -192,6 +192,7 @@ function groups_setup_sidebar_menus() {
* Group members: groups/members/<guid>
*
* @param array $page Array of url segments for routing
+ * @return bool
*/
function groups_page_handler($page) {
@@ -238,13 +239,17 @@ function groups_page_handler($page) {
case 'requests':
groups_handle_requests_page($page[1]);
break;
+ default:
+ return false;
}
+ return true;
}
/**
* Handle group icons.
*
- * @param unknown_type $page
+ * @param array $page
+ * @return void
*/
function groups_icon_handler($page) {
@@ -258,6 +263,7 @@ function groups_icon_handler($page) {
// Include the standard profile index
$plugin_dir = elgg_get_plugins_path();
include("$plugin_dir/groups/icon.php");
+ return true;
}
/**
@@ -750,6 +756,7 @@ function discussion_init() {
* Edit discussion topic: discussion/edit/<guid>
*
* @param array $page Array of url segments for routing
+ * @return bool
*/
function discussion_page_handler($page) {
@@ -773,7 +780,10 @@ function discussion_page_handler($page) {
case 'view':
discussion_handle_view_page($page[1]);
break;
+ default:
+ return false;
}
+ return true;
}
/**
@@ -820,7 +830,7 @@ function discussion_add_to_river_menu($hook, $type, $return, $params) {
if (elgg_instanceof($object, 'object', 'groupforumtopic')) {
if ($item->annotation_id == 0) {
$group = $object->getContainerEntity();
- if ($group->canWriteToContainer() || elgg_is_admin_logged_in()) {
+ if ($group && ($group->canWriteToContainer() || elgg_is_admin_logged_in())) {
$options = array(
'name' => 'reply',
'href' => "#groups-reply-$object->guid",