summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-11-29 12:59:21 +0000
committerDries Buytaert <dries@buytaert.net>2004-11-29 12:59:21 +0000
commite35137a5ad5d98c74777fc49bbd586ce1d0627c9 (patch)
tree2810f51f4a601d405131dbbbd14306cc79a9ff1b /modules/comment/comment.module
parente7ce1e3ccb7dce31aa9f4ecdaa66f9c1d3953e8c (diff)
downloadbrdo-e35137a5ad5d98c74777fc49bbd586ce1d0627c9.tar.gz
brdo-e35137a5ad5d98c74777fc49bbd586ce1d0627c9.tar.bz2
- Patch #12555 by svemir: fixed problem with the 'Preview comment' button not being present when previews are optional.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module6
1 files changed, 2 insertions, 4 deletions
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'));
}