diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-06-20 16:52:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-06-20 16:52:55 +0000 |
commit | 928822d0a9fc3ceb520d13ac2481a7030a9b283f (patch) | |
tree | 57a2ef1e31042ad3f786be9b349b793f2c669016 /modules | |
parent | 95c66fa9fb8c2eacf9993d0c3f3b077898981ce0 (diff) | |
download | brdo-928822d0a9fc3ceb520d13ac2481a7030a9b283f.tar.gz brdo-928822d0a9fc3ceb520d13ac2481a7030a9b283f.tar.bz2 |
- Patch #272054 by David Rothstein: fixed code comment for comment_form().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment/comment.module | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 26a03ca28..67861b078 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1410,9 +1410,10 @@ function comment_form(&$form_state, $edit, $title = NULL) { '#value' => !empty($edit['uid']) ? $edit['uid'] : NULL, ); - // Only show save button if preview is optional or if we are in preview mode. - // We show the save button in preview mode even if there are form errors so that - // optional form elements (e.g., captcha) can be updated in preview mode. + // Only show the save button if comment previews are optional or if we are + // already previewing the submission. However, if there are form errors, + // we hide the save button no matter what, so that optional form elements + // (e.g., captchas) can be updated. if (!form_get_errors() && ((variable_get('comment_preview_' . $node->type, COMMENT_PREVIEW_REQUIRED) == COMMENT_PREVIEW_OPTIONAL) || ($op == t('Preview')) || ($op == t('Save')))) { $form['submit'] = array( '#type' => 'submit', |