projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added A. Kirtchwitz's check for set up empty MIME type.
[squirrelmail.git]
/
src
/
compose.php
diff --git
a/src/compose.php
b/src/compose.php
index 06c676fb59532f55ac96390aa659fb1a064aa34f..10bb65a54a5e08f03ed4ce218d4deb112cba5fb1 100644
(file)
--- a/
src/compose.php
+++ b/
src/compose.php
@@
-362,6
+362,11
@@
echo " <input type=submit name=\"html_addr_search\" value=\""._("Addresses")."\">";
}
echo "\n <INPUT TYPE=SUBMIT NAME=send VALUE=\"". _("Send") . "\">\n";
echo " <input type=submit name=\"html_addr_search\" value=\""._("Addresses")."\">";
}
echo "\n <INPUT TYPE=SUBMIT NAME=send VALUE=\"". _("Send") . "\">\n";
+ echo "\n ". _("Priority") .":<select name=\"mailprio\">".
+ "\n <option value=1>". _("High") ."</option>".
+ "\n <option value=3 selected>". _("Normal") ."</option>".
+ "\n <option value=5>". _("Low") ."</option>".
+ "\n </select>";
do_hook("compose_button_row");
do_hook("compose_button_row");
@@
-403,7
+408,10
@@
$newAttachment['remotefilename'] = $HTTP_POST_FILES['attachfile']['name'];
$newAttachment['type'] =
strtolower($HTTP_POST_FILES['attachfile']['type']);
$newAttachment['remotefilename'] = $HTTP_POST_FILES['attachfile']['name'];
$newAttachment['type'] =
strtolower($HTTP_POST_FILES['attachfile']['type']);
-
+
+ if ($newAttachment['type'] == "")
+ $newAttachment['type'] = 'application/octet-stream';
+
$attachments[] = $newAttachment;
}
$attachments[] = $newAttachment;
}
@@
-431,11
+439,12
@@
// Rewrap $body so that no line is bigger than $editor_size
// This should only really kick in the sqWordWrap function
// if the browser doesn't support "HARD" as the wrap type
// Rewrap $body so that no line is bigger than $editor_size
// This should only really kick in the sqWordWrap function
// if the browser doesn't support "HARD" as the wrap type
+ // Or, in Opera's case, something goes wrong.
$body = explode("\n", $body);
$newBody = '';
foreach ($body as $line) {
$body = explode("\n", $body);
$newBody = '';
foreach ($body as $line) {
- $line = trim($line);
- if (strlen($line) <= $editor_size)
+ $line =
r
trim($line);
+ if (strlen($line) <= $editor_size
+ 1
)
$newBody .= $line . "\n";
else {
sqWordWrap($line, $editor_size) . "\n";
$newBody .= $line . "\n";
else {
sqWordWrap($line, $editor_size) . "\n";
@@
-446,7
+455,7
@@
do_hook("compose_send");
do_hook("compose_send");
- if (! sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id)) {
+ if (! sendMessage($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id
, $mailprio
)) {
showInputForm();
exit();
}
showInputForm();
exit();
}