diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-30 20:59:06 -0800 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-30 20:59:06 -0800 |
commit | 07c5fbae1dd1e4e46f57e0353f471c7ad30067eb (patch) | |
tree | df4b7be2fd07af0b5564078cf56b2e81e1a77f4b /modules/comment/comment.module | |
parent | bbede7f65093c4f85a99dc94282809436effc799 (diff) | |
download | brdo-07c5fbae1dd1e4e46f57e0353f471c7ad30067eb.tar.gz brdo-07c5fbae1dd1e4e46f57e0353f471c7ad30067eb.tar.bz2 |
Issue #1110650 follow-up by grendzy, oriol_e9g, sun: Fixed comment-by-anonymous class never appears.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 3ec441075..2793ea3b5 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -2294,24 +2294,26 @@ function template_preprocess_comment(&$variables) { else { $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published'; } + // Gather comment classes. - if ($comment->uid == 0) { + // 'comment-published' class is not needed, it is either 'comment-preview' or + // 'comment-unpublished'. + if ($variables['status'] != 'comment-published') { + $variables['classes_array'][] = $variables['status']; + } + if ($variables['new']) { + $variables['classes_array'][] = 'comment-new'; + } + if (!$comment->uid) { $variables['classes_array'][] = 'comment-by-anonymous'; } else { - // Published class is not needed. It is either 'comment-preview' or 'comment-unpublished'. - if ($variables['status'] != 'comment-published') { - $variables['classes_array'][] = $variables['status']; - } - if ($comment->uid === $variables['node']->uid) { + if ($comment->uid == $variables['node']->uid) { $variables['classes_array'][] = 'comment-by-node-author'; } - if ($comment->uid === $variables['user']->uid) { + if ($comment->uid == $variables['user']->uid) { $variables['classes_array'][] = 'comment-by-viewer'; } - if ($variables['new']) { - $variables['classes_array'][] = 'comment-new'; - } } } |