aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/groups/start.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/groups/start.php b/mod/groups/start.php
index e39c37000..c8198371b 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -714,6 +714,7 @@ function discussion_init() {
elgg_register_library('elgg:discussion', elgg_get_plugins_path() . 'groups/lib/discussion.php');
elgg_register_page_handler('discussion', 'discussion_page_handler');
+ elgg_register_page_handler('forum', 'discussion_forum_page_handler');
elgg_register_entity_url_handler('object', 'groupforumtopic', 'discussion_override_topic_url');
@@ -745,6 +746,20 @@ function discussion_init() {
}
/**
+ * Exists for backwards compatibility for Elgg 1.7
+ */
+function discussion_forum_page_handler($page) {
+ switch ($page[0]) {
+ case 'topic':
+ header('Status: 301 Moved Permanently');
+ forward("/discussion/view/{$page[1]}/{$page[2]}");
+ break;
+ default:
+ return false;
+ }
+}
+
+/**
* Discussion page handler
*
* URLs take the form of