aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/groups/addtopic.php6
-rw-r--r--mod/groups/discussions.php4
-rw-r--r--mod/groups/edittopic.php2
-rw-r--r--mod/groups/topicposts.php4
4 files changed, 10 insertions, 6 deletions
diff --git a/mod/groups/addtopic.php b/mod/groups/addtopic.php
index 167dcbf32..08e335f03 100644
--- a/mod/groups/addtopic.php
+++ b/mod/groups/addtopic.php
@@ -13,9 +13,11 @@
// Load Elgg engine
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- $page_owner = set_page_owner((int)get_input('group_guid'));
+ gatekeeper();
- if (!(page_owner_entity() instanceof ElggGroup)) forward();
+ $page_owner = set_page_owner((int)get_input('group_guid'));
+
+ if (!(page_owner_entity() instanceof ElggGroup)) forward();
// sort the display
$area2 = elgg_view("forms/forums/addtopic");
diff --git a/mod/groups/discussions.php b/mod/groups/discussions.php
index 4fa1cb5ca..19821c3b3 100644
--- a/mod/groups/discussions.php
+++ b/mod/groups/discussions.php
@@ -15,11 +15,11 @@
// Load Elgg engine
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
- // Get the current page's owner
+ // Get the current page's owner
$page_owner = page_owner_entity();
if ($page_owner === false || is_null($page_owner)) {
$page_owner = $_SESSION['user'];
- set_page_owner($page_owner->getGUID());
+ set_page_owner($_SESSION['guid']);
}
// Display them
diff --git a/mod/groups/edittopic.php b/mod/groups/edittopic.php
index d6e8559fd..1e9fba8b8 100644
--- a/mod/groups/edittopic.php
+++ b/mod/groups/edittopic.php
@@ -13,6 +13,8 @@
// Load Elgg engine
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+ gatekeeper();
+
get_input('group');
$page_owner = set_page_owner((int)get_input('group'));
diff --git a/mod/groups/topicposts.php b/mod/groups/topicposts.php
index 34886f3fe..941e962ad 100644
--- a/mod/groups/topicposts.php
+++ b/mod/groups/topicposts.php
@@ -14,8 +14,8 @@
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
//get_input('group_guid');
- set_page_owner((int)get_input('group_guid'));
- if (!(page_owner_entity() instanceof ElggGroup)) forward();
+ set_page_owner((int)get_input('group_guid'));
+ if (!(page_owner_entity() instanceof ElggGroup)) forward();
// get the entity from id
$topic = get_entity(get_input('topic'));