$body = str_replace("\r", "\n", $body);
/**
- * If the browser doesn't support "VIRTUAL" as the wrap type.
- * then the line length will be longer than $editor_size
- * almost all browsers support VIRTUAL, so remove the line by line checking
- * If this causes a problem, call sqBodyWrap
+ * Rewrap $body so that no line is bigger than $editor_size
*/
- // sqBodyWrap($body, $editor_size);
+ $body = explode("\n", $body);
+ $newBody = '';
+ foreach ($body as $line) {
+ if( $line <> '-- ' ) {
+ $line = rtrim($line);
+ }
+ if (strlen($line) <= $editor_size + 1) {
+ $newBody .= $line . "\n";
+ } else {
+ sqWordWrap($line, $editor_size);
+ $newBody .= $line . "\n";
+
+ }
+
+ }
+ $body = $newBody;
$composeMessage=$compose_messages[$session];
echo ' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4], 'width="10%"' ) .
- _("To:") . '</td>' . "\n" .
+ _("To") . ':</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4], 'width="90%"' ) .
addInput('send_to', $send_to, 60). '<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("CC:") . '</td>' . "\n" .
+ _("Cc") . ':</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) .
- addInput('send_to_cc', $send_to_cc, 60). '<br />' . "\n" .
+ addInput('send_to_cc', $send_to_cc, 60). '<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("BCC:") . '</td>' . "\n" .
+ _("Bcc") . ':</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) .
- addInput('send_to_bcc', $send_to_bcc, 60).'<br />' . "\n" .
+ addInput('send_to_bcc', $send_to_bcc, 60).'<br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n" .
' <tr>' . "\n" .
html_tag( 'td', '', 'right', $color[4] ) .
- _("Subject:") . '</td>' . "\n" .
+ _("Subject") . ':</td>' . "\n" .
html_tag( 'td', '', 'left', $color[4] ) . "\n";
echo ' '.addInput('subject', $subject, 60).
' </td>' . "\n" .
} else {
echo ' <tr>' . "\n" .
html_tag( 'td', '', 'right', '', 'colspan="2"' ) . "\n" .
- ' <input type="submit" name="send" value="' . _("Send") . '" />' . "\n" .
+ ' ' . addSubmit(_("Send"), 'send').
' <br /><br />' . "\n" .
' </td>' . "\n" .
' </tr>' . "\n";
$attachment->mime_header->type1;
$s_a[] = '<table bgcolor="'.$color[0].
- '" border="0"><tr><td>'.
- addCheckBox('delete[]', FALSE, $key).
- "</td><td>\n" . $attached_filename .
+ '" border="0"><tr><td>'.
+ addCheckBox('delete[]', FALSE, $key).
+ "</td><td>\n" . $attached_filename .
'</td><td>-</td><td> ' . $type . '</td><td>('.
show_readable_size( filesize( $attached_file ) ) . ')</td></tr></table>'."\n";
}
}
echo '</table>' . "\n" .
- addHidden('username', $username).
- addHidden('smaction', $action).
- addHidden('mailbox', $mailbox);
+ addHidden('username', $username).
+ addHidden('smaction', $action).
+ addHidden('mailbox', $mailbox);
/*
store the complete ComposeMessages array in a hidden input value
so we can restore them in case of a session timeout.
*/
sqgetGlobalVar('QUERY_STRING', $queryString, SQ_SERVER);
echo addHidden('restoremessages', serialize($compose_messages)).
- addHidden('composesession', $composesession).
- addHidden('querystring', $queryString).
- "</form>\n";
+ addHidden('composesession', $composesession).
+ addHidden('querystring', $queryString).
+ "</form>\n";
if (!(bool) ini_get('file_uploads')) {
/* File uploads are off, so we didn't show that part of the form.
To avoid bogus bug reports, tell the user why. */
return $succes;
}
-?>
\ No newline at end of file
+// vim: et ts=4
+?>