]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #2090 context sensitive sidebar box is added - groups off
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Mar 2011 00:54:42 +0000 (00:54 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 22 Mar 2011 00:54:42 +0000 (00:54 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8813 36083f99-b078-4883-b0ff-0f9b5a30f544

views/default/page/elements/comments_block.php

index 5571dc707d51dba08299a8e8eb907d0d20247694..751aa43121d09b92732fe4aff467f67ca2686ad6 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * Display the latest related comments
  *
- * Generally used in a sidebar
+ * Generally used in a sidebar. Does not work with groups currently.
  *
  * @uses $vars['subtypes']   Object subtype string or array of subtypes
  * @uses $vars['owner_guid'] The owner of the content being commented on
@@ -14,6 +14,12 @@ if (!$owner_guid) {
        $owner_guid = ELGG_ENTITIES_ANY_VALUE;
 }
 
+$owner_entity = get_entity($owner_guid);
+if ($owner_entity && elgg_instanceof($owner_entity, 'group')) {
+       // not supporting groups so return
+       return true;
+}
+
 $options = array(
        'annotation_name' => 'generic_comment',
        'owner_guid' => $owner_guid,