From 7dfb1fba5001299300736e6b5d95d9400575e3e7 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Thu, 18 Sep 2008 14:59:02 -0400 Subject: [PATCH] Set the right number of arguments for setcookie() --- program/steps/mail/compose.inc | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 02d062c..7995b34 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -241,7 +241,7 @@ if ($fname && $field_type) { // pass the following attributes to the form class - $field_attrib = array('name' => $fname); + $field_attrib = array('name' => $fname, 'spellcheck' => 'false'); foreach ($attrib as $attr => $value) if (in_array($attr, $allow_attrib)) $field_attrib[$attr] = $value; @@ -543,11 +543,14 @@ if (!$bodyIsHtml) { - $prefix = sprintf("\n\n\n-------- Original Message --------\nSubject: %s\nDate: %s\nFrom: %s\nTo: %s\n\n", - $MESSAGE->subject, - $MESSAGE->headers->date, - $MESSAGE->get_header('from'), - $MESSAGE->get_header('to')); + $prefix = "\n\n\n-------- Original Message --------\n"; + $prefix .= 'Subject: ' . $MESSAGE->subject . "\n"; + $prefix .= 'Date: ' . $MESSAGE->headers->date . "\n"; + $prefix .= 'From: ' . $MESSAGE->get_header('from') . "\n"; + $prefix .= 'To: ' . $MESSAGE->get_header('to') . "\n"; + if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) + $prefix .= 'Reply-To: ' . $MESSAGE->get_header('replyto') . "\n"; + $prefix .= "\n"; } else { @@ -557,12 +560,17 @@ "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Subject: </th><td>%s</td></tr>" . "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Date: </th><td>%s</td></tr>" . "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">From: </th><td>%s</td></tr>" . - "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">To: </th><td>%s</td></tr>" . - "</tbody></table><br>", + "<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">To: </th><td>%s</td></tr>", Q($MESSAGE->subject), Q($MESSAGE->headers->date), htmlspecialchars(Q($MESSAGE->get_header('from'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true), - htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); + htmlspecialchars(Q($MESSAGE->get_header('to'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); + + if ($MESSAGE->headers->replyto && $MESSAGE->headers->replyto != $MESSAGE->headers->from) + $prefix .= sprintf("<tr><th align=\"right\" nowrap=\"nowrap\" valign=\"baseline\">Reply-To: </th><td>%s</td></tr>", + htmlspecialchars(Q($MESSAGE->get_header('replyto'), 'replace'), ENT_COMPAT, $OUTPUT->get_charset(), true)); + + $prefix .= "</tbody></table><br>"; } // add attachments @@ -650,6 +658,7 @@ unset($attrib['form']); $attrib['name'] = '_subject'; + $attrib['spellcheck'] = 'true'; $textfield = new html_inputfield($attrib); $subject = ''; -- Gitblit v1.9.1