From 3b6143c0c5861685a8161e7816824a225290185f Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 30 Dec 2010 18:56:31 +0000 Subject: updated the default object entity view git-svn-id: http://code.elgg.org/elgg/trunk@7773 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/output/access.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'views/default/output/access.php') diff --git a/views/default/output/access.php b/views/default/output/access.php index 5490d3203..cb1ffc94c 100644 --- a/views/default/output/access.php +++ b/views/default/output/access.php @@ -14,9 +14,9 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { // 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. - $container = get_entity($vars['entity']->container_guid); + $container = $vars['entity']->getContainerEntity(); - if ($container instanceof ElggGroup) { + if ($container && $container instanceof ElggGroup) { // we decided to show that the item is in a group, rather than its actual access level // not required. Group ACLs are prepended with "Group: " when written. //$access_id_string = elgg_echo('groups:group') . $container->name; @@ -27,7 +27,7 @@ if (isset($vars['entity']) && elgg_instanceof($vars['entity'])) { } else { $access_class .= ' group_closed'; } - } elseif ($container->getSubtype() == 'shared_access') { + } elseif ($container && $container->getSubtype() == 'shared_access') { $access_level .= ' shared_collection'; } elseif ($access_id == ACCESS_PRIVATE) { $access_level .= ' private'; -- cgit v1.2.3