summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-07-27 13:16:17 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-07-27 13:16:17 -0700
commitb38a806c16a0209e111aa832b8dc12fded1471ce (patch)
tree0b3d64857d18064c894fa081e22c26c4e0da2074 /modules/comment/comment.module
parent4cede694ab76a1e02bacb9c79d89d8bd4659a842 (diff)
downloadbrdo-b38a806c16a0209e111aa832b8dc12fded1471ce.tar.gz
brdo-b38a806c16a0209e111aa832b8dc12fded1471ce.tar.bz2
Drupal 7.5
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 8d0c3d362..9c31f4427 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2681,6 +2681,10 @@ function comment_rdf_mapping() {
*/
function comment_file_download_access($field, $entity_type, $entity) {
if ($entity_type == 'comment') {
- return user_access('access comments') && $entity->status == COMMENT_PUBLISHED || user_access('administer comments');
+ if (user_access('access comments') && $entity->status == COMMENT_PUBLISHED || user_access('administer comments')) {
+ $node = node_load($entity->nid);
+ return node_access('view', $node);
+ }
+ return FALSE;
}
}