aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/start.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
committerSem <sembrestels@riseup.net>2011-11-18 07:32:27 +0100
commite53d410129701ea1c9d19529afa493f11b5f5b70 (patch)
treed9963b24bf8932654b4a47e36602c75975e50dba /mod/groups/start.php
parent377da25d2965c64941f83baae119fc970ec60982 (diff)
parent08a962c98e2923724f8013d6eaae89101243752a (diff)
downloadelgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz
elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2
Merge github.com:Elgg/Elgg
Conflicts: engine/lib/input.php
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;
}
/**