diff options
author | Steve Clay <steve@mrclay.org> | 2012-09-07 01:38:03 -0400 |
---|---|---|
committer | Steve Clay <steve@mrclay.org> | 2012-09-07 01:38:03 -0400 |
commit | 8916fcdca6a2950d210abd2db7e6fb104abec149 (patch) | |
tree | 6df6b80f2b039a623cde43de3e1e6fac85fe6463 /engine/lib/views.php | |
parent | 9ccbd106a87a1742a61cc4df0e9ead921046772a (diff) | |
download | elgg-8916fcdca6a2950d210abd2db7e6fb104abec149.tar.gz elgg-8916fcdca6a2950d210abd2db7e6fb104abec149.tar.bz2 |
Fixes #4789: group_gatekeeper() and river hide closed/invisible group content more reliably
Diffstat (limited to 'engine/lib/views.php')
-rw-r--r-- | engine/lib/views.php | 8 |
1 files changed, 7 insertions, 1 deletions
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; |