From e013de96d9c734b4b4ce7bc26c928c2b82c4063a Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 17 Jul 2009 01:22:40 +0000 Subject: added more catches for accessing closed group content --- viewalbum.php | 3 +++ viewimage.php | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/viewalbum.php b/viewalbum.php index 602963816..9342db1e6 100644 --- a/viewalbum.php +++ b/viewalbum.php @@ -19,6 +19,9 @@ else set_page_owner($album->owner_guid); + // if this page belongs to a closed group, prevent anyone outside group from seeing + if (is_callable('group_gatekeeper')) group_gatekeeper(); + $owner = page_owner_entity(); // setup group menu diff --git a/viewimage.php b/viewimage.php index 3a0d42b5d..05efff6df 100644 --- a/viewimage.php +++ b/viewimage.php @@ -9,7 +9,7 @@ // Load Elgg engine include_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - // get the album entity + // get the album entity $photo_guid = (int) get_input('guid'); $photo = get_entity($photo_guid); @@ -25,6 +25,10 @@ set_page_owner($owner_guid); } + // if this page belongs to a closed group, prevent anyone outside group from seeing + if (is_callable('group_gatekeeper')) group_gatekeeper(); + + $page_owner = page_owner_entity(); if ($page_owner instanceof ElggGroup) { add_submenu_item( sprintf(elgg_echo('album:group'),$page_owner->name), -- cgit v1.2.3