summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/comment.module6
-rw-r--r--modules/comment/comment.module6
2 files changed, 4 insertions, 8 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 08f9029ae..964a9cdd4 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -1405,11 +1405,9 @@ function theme_comment_form($edit, $title) {
$form .= form_hidden('pid', $edit['pid']);
$form .= form_hidden('nid', $edit['nid']);
- if (variable_get('comment_preview', 1)) {
- $form .= form_submit(t('Preview comment'));
- }
+ $form .= form_submit(t('Preview comment'));
- if (!form_get_errors()) {
+ if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment') && !form_get_errors())) {
$form .= form_submit(t('Post comment'));
}
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 08f9029ae..964a9cdd4 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1405,11 +1405,9 @@ function theme_comment_form($edit, $title) {
$form .= form_hidden('pid', $edit['pid']);
$form .= form_hidden('nid', $edit['nid']);
- if (variable_get('comment_preview', 1)) {
- $form .= form_submit(t('Preview comment'));
- }
+ $form .= form_submit(t('Preview comment'));
- if (!form_get_errors()) {
+ if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment') && !form_get_errors())) {
$form .= form_submit(t('Post comment'));
}