Commit e35137a5 authored by Dries's avatar Dries

- Patch #12555 by svemir: fixed problem with the 'Preview comment' button not...

- Patch #12555 by svemir: fixed problem with the 'Preview comment' button not being present when previews are optional.
parent e7ce1e3c
......@@ -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'));
}
......
......@@ -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'));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment