summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-10-01 08:43:51 +0000
committerDries Buytaert <dries@buytaert.net>2005-10-01 08:43:51 +0000
commit0200ccf4da9bfa015361d13ebb040800944f5df9 (patch)
tree661e233cdf96d1ae04c59296ab46c6c7f53574d3 /modules
parentf8e2be5fe797314ac04c9730b63efd6e8dadf125 (diff)
downloadbrdo-0200ccf4da9bfa015361d13ebb040800944f5df9.tar.gz
brdo-0200ccf4da9bfa015361d13ebb040800944f5df9.tar.bz2
- Patch by chx: fixed validation check.
Diffstat (limited to 'modules')
-rw-r--r--modules/comment.module6
-rw-r--r--modules/comment/comment.module6
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 01f732a62..3ef7b6504 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -546,8 +546,10 @@ function comment_preview($edit) {
}
$comment->timestamp = $edit['timestamp'] ? $edit['timestamp'] : time();
- // Preview the comment.
- $output .= theme('comment_view', $comment);
+ // Preview the comment with security check.
+ if (!form_get_errors()) {
+ $output .= theme('comment_view', $comment);
+ }
$output .= theme('comment_form', $edit, t('Reply'));
if ($edit['pid']) {
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 01f732a62..3ef7b6504 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -546,8 +546,10 @@ function comment_preview($edit) {
}
$comment->timestamp = $edit['timestamp'] ? $edit['timestamp'] : time();
- // Preview the comment.
- $output .= theme('comment_view', $comment);
+ // Preview the comment with security check.
+ if (!form_get_errors()) {
+ $output .= theme('comment_view', $comment);
+ }
$output .= theme('comment_form', $edit, t('Reply'));
if ($edit['pid']) {