From 8916fcdca6a2950d210abd2db7e6fb104abec149 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Fri, 7 Sep 2012 01:38:03 -0400 Subject: Fixes #4789: group_gatekeeper() and river hide closed/invisible group content more reliably --- engine/lib/views.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engine/lib/views.php') diff --git a/engine/lib/views.php b/engine/lib/views.php index b00334062..90737c260 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1243,7 +1243,7 @@ function elgg_view_module($type, $title, $body, array $vars = array()) { * @param ElggRiverItem $item A river item object * @param array $vars An array of variables for the view * - * @return string|false Depending on success + * @return string */ function elgg_view_river_item($item, array $vars = array()) { // checking default viewtype since some viewtypes do not have unique views per item (rss) @@ -1256,6 +1256,12 @@ function elgg_view_river_item($item, array $vars = array()) { if (!$subject || !$object) { // subject is disabled or subject/object deleted return ''; + } else { + // hide based on object's container + $visibility = ElggGroupItemVisibility::factory($object->container_guid); + if ($visibility->shouldHideItems) { + return ''; + } } $vars['item'] = $item; -- cgit v1.2.3 From 68441b33797e681a03fc61d217e1d110baa9e482 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Wed, 19 Dec 2012 14:11:37 -0500 Subject: Refs #4789. Removing the container check for river items. --- engine/lib/views.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'engine/lib/views.php') diff --git a/engine/lib/views.php b/engine/lib/views.php index c1b616cf1..8618c2997 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1235,13 +1235,16 @@ function elgg_view_river_item($item, array $vars = array()) { if (!$subject || !$object) { // subject is disabled or subject/object deleted return ''; - } else { - // hide based on object's container - $visibility = ElggGroupItemVisibility::factory($object->container_guid); - if ($visibility->shouldHideItems) { - return ''; - } } + // Don't hide objects in closed groups that a user can see. + // see http://trac.elgg.org/ticket/4789 +// else { +// // hide based on object's container +// $visibility = ElggGroupItemVisibility::factory($object->container_guid); +// if ($visibility->shouldHideItems) { +// return ''; +// } +// } $vars['item'] = $item; -- cgit v1.2.3