summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 8fd0e1ab4..dc217aca6 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1312,17 +1312,17 @@ function comment_form(&$form_state, $edit, $title = NULL) {
$form['nid'] = array('#type' => 'value', '#value' => $edit['nid']);
$form['uid'] = array('#type' => 'value', '#value' => !empty($edit['uid']) ? $edit['uid'] : NULL);
- $form['preview'] = array('#type' => 'button', '#value' => t('Preview comment'), '#weight' => 19);
- $form['#token'] = 'comment'. $edit['nid'] . (isset($edit['pid']) ? $edit['pid'] : '');
-
- // 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
+ // 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.
- if (!form_get_errors() && ((variable_get('comment_preview_'. $node->type, 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);
+ 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', '#value' => t('Save'), '#weight' => 19);
}
+
+ $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 20);
+ $form['#token'] = 'comment'. $edit['nid'] . (isset($edit['pid']) ? $edit['pid'] : '');
- if ($op == t('Preview comment')) {
+ if ($op == t('Preview')) {
$form['#after_build'] = array('comment_form_add_preview');
}