aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-22 00:54:42 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-22 00:54:42 +0000
commita56299d152912d2617ffe4f7f59fce7f3d925e88 (patch)
tree17f9c6a23b45d29dd8c3cdb32b54ab3e3c288196
parent6e77aa3d528f6dac462dfab3f7db8fa38be4b3c3 (diff)
downloadelgg-a56299d152912d2617ffe4f7f59fce7f3d925e88.tar.gz
elgg-a56299d152912d2617ffe4f7f59fce7f3d925e88.tar.bz2
Fixes #2090 context sensitive sidebar box is added - groups off
git-svn-id: http://code.elgg.org/elgg/trunk@8813 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--views/default/page/elements/comments_block.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/views/default/page/elements/comments_block.php b/views/default/page/elements/comments_block.php
index 5571dc707..751aa4312 100644
--- a/views/default/page/elements/comments_block.php
+++ b/views/default/page/elements/comments_block.php
@@ -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,