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.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 9e4694457..7dcf6b7c4 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;
}
/**
@@ -435,7 +441,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) {
'href' => $url,
'text' => "<span class=\"elgg-icon elgg-icon-delete\"></span>",
'confirm' => elgg_echo('deleteconfirm'),
- 'text_encode' => false
+ 'encode_text' => false
);
$return[] = ElggMenuItem::factory($options);
@@ -447,7 +453,7 @@ function groups_annotation_menu_setup($hook, $type, $return, $params) {
'name' => 'edit',
'href' => "#edit-annotation-$annotation->id",
'text' => elgg_echo('edit'),
- 'text_encode' => false,
+ 'encode_text' => false,
'rel' => 'toggle',
);
$return[] = ElggMenuItem::factory($options);
@@ -562,8 +568,10 @@ function groups_user_join_event_listener($event, $object_type, $object) {
* Make sure users are added to the access collection
*/
function groups_access_collection_override($hook, $entity_type, $returnvalue, $params) {
- if (elgg_instanceof(get_entity($params['collection']->owner_guid), 'group')) {
- return true;
+ if (isset($params['collection'])) {
+ if (elgg_instanceof(get_entity($params['collection']->owner_guid), 'group')) {
+ return true;
+ }
}
}
@@ -748,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) {
@@ -771,7 +780,10 @@ function discussion_page_handler($page) {
case 'view':
discussion_handle_view_page($page[1]);
break;
+ default:
+ return false;
}
+ return true;
}
/**