- Modified patch #46227 by chx: comment token is broken.
parent
4ffb77baae
commit
a6dac9d2ab
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue