aboutsummaryrefslogtreecommitdiff
path: root/views/default/output/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/output/access.php')
-rw-r--r--views/default/output/access.php23
1 files changed, 6 insertions, 17 deletions
diff --git a/views/default/output/access.php b/views/default/output/access.php
index fdb8fe1a1..5c8d62c4d 100644
--- a/views/default/output/access.php
+++ b/views/default/output/access.php
@@ -11,7 +11,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) {
$access_id = $vars['entity']->access_id;
$access_class = 'elgg-access';
$access_id_string = get_readable_access_level($access_id);
- $access_id_string = htmlentities($access_id_string, ENT_QUOTES, 'UTF-8');
+ $access_id_string = htmlspecialchars($access_id_string, ENT_QUOTES, 'UTF-8', false);
// if within a group or shared access collection display group name and open/closed membership status
// @todo have a better way to do this instead of checking against subtype / class.
@@ -28,23 +28,12 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) {
} else {
$access_class .= ' elgg-access-group-closed';
}
- }
- switch ($access_id) {
- case ACCESS_PRIVATE:
- $access_class .= ' elgg-access-private';
- break;
- case ACCESS_FRIENDS:
- $access_class .= ' elgg-access-friends';
- break;
- case ACCESS_LOGGED_IN:
- $access_class .= ' elgg-access-loggedin';
- break;
- case ACCESS_PUBLIC:
- $access_class .= ' elgg-access-public';
- break;
- default:
- $access_class .= ' elgg-access-group';
+ // @todo this is plugin specific code in core. Should be removed.
+ } elseif ($container && $container->getSubtype() == 'shared_access') {
+ $access_class .= ' shared_collection';
+ } elseif ($access_id == ACCESS_PRIVATE) {
+ $access_class .= ' elgg-access-private';
}
$help_text = elgg_echo('access:help');