Commit 0200ccf4 authored by Dries's avatar Dries

- Patch by chx: fixed validation check.

parent f8e2be5f
......@@ -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']) {
......
......@@ -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']) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment