diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-04 19:24:24 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-04 19:24:24 +0000 |
commit | 258b5760202eeb7140021cf15e6b7c51eba5127d (patch) | |
tree | 4488d2fe9e4313c1127cb015113bff2cde688e28 /modules/comment/comment.module | |
parent | b5e64f5a6ed1c7160a6104097185cc486db3aa95 (diff) | |
download | brdo-258b5760202eeb7140021cf15e6b7c51eba5127d.tar.gz brdo-258b5760202eeb7140021cf15e6b7c51eba5127d.tar.bz2 |
#199809 by theborg: comment templates were not checking status properly (fix notice, allows themes to theme in-preview comments differently)
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 2c2330d1a..4c00cf191 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1680,6 +1680,13 @@ function template_preprocess_comment(&$variables) { $variables['submitted'] = theme('comment_submitted', $comment); $variables['title'] = l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")); $variables['template_files'][] = 'comment-'. $node->type; + // set status to a string representation of comment->status. + if (isset($comment->preview)) { + $variables['status'] = 'comment-preview'; + } + else { + $variables['status'] = ($comment->status == COMMENT_NOT_PUBLISHED) ? 'comment-unpublished' : 'comment-published'; + } } /** |