From 6292a156060339a4794c6feec42f53302b777aed Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 8 Aug 2008 14:02:43 +0000 Subject: Removing some wsod issues git-svn-id: https://code.elgg.org/elgg/trunk@1794 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/addtopic.php | 6 ++++-- mod/groups/discussions.php | 4 ++-- mod/groups/edittopic.php | 2 ++ mod/groups/topicposts.php | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) (limited to 'mod') 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')); -- cgit v1.2.3