diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-31 15:26:39 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-31 15:26:39 +0000 |
commit | a6dac9d2ab68ba9e51fca46100534725c2a94ce7 (patch) | |
tree | 60106da1f88fcc51e0f2095d9efe8c5987d528b0 | |
parent | 4ffb77baae95c35d4bf5936b86b856da19101bde (diff) | |
download | brdo-a6dac9d2ab68ba9e51fca46100534725c2a94ce7.tar.gz brdo-a6dac9d2ab68ba9e51fca46100534725c2a94ce7.tar.bz2 |
- Modified patch #46227 by chx: comment token is broken.
-rw-r--r-- | modules/comment.module | 3 | ||||
-rw-r--r-- | modules/comment/comment.module | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/modules/comment.module b/modules/comment.module index be7aab813..637e04e5b 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -496,7 +496,6 @@ function comment_reply($nid, $pid = NULL) { } else if (user_access('access content')) { $output .= node_view($node); - $pid = 0; } // should we show the reply box? @@ -1350,7 +1349,7 @@ function comment_form($edit, $title = NULL) { // Only show post button if preview is optional or if we are in preview mode. // We show the post button in preview mode even if there are form errors so that // optional form elements (e.g., captcha) can be updated in preview mode. - if ((variable_get('comment_preview', COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview comment')) || ($op == t('Post comment'))) { + if (!form_get_errors() && ((variable_get('comment_preview', COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview comment')) || ($op == t('Post comment')))) { $form['submit'] = array('#type' => 'submit', '#value' => t('Post comment'), '#weight' => 20); } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index be7aab813..637e04e5b 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -496,7 +496,6 @@ function comment_reply($nid, $pid = NULL) { } else if (user_access('access content')) { $output .= node_view($node); - $pid = 0; } // should we show the reply box? @@ -1350,7 +1349,7 @@ function comment_form($edit, $title = NULL) { // Only show post button if preview is optional or if we are in preview mode. // We show the post button in preview mode even if there are form errors so that // optional form elements (e.g., captcha) can be updated in preview mode. - if ((variable_get('comment_preview', COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview comment')) || ($op == t('Post comment'))) { + if (!form_get_errors() && ((variable_get('comment_preview', COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview comment')) || ($op == t('Post comment')))) { $form['submit'] = array('#type' => 'submit', '#value' => t('Post comment'), '#weight' => 20); } |