projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
whoops, i submitted the wrong compose. :)
[squirrelmail.git]
/
src
/
compose.php
diff --git
a/src/compose.php
b/src/compose.php
index 85aba1815a9625b7b03d20f75de13e9de900e863..a1e43f78b0b3eccf959d9ee767b98369b8ee3c71 100644
(file)
--- a/
src/compose.php
+++ b/
src/compose.php
@@
-75,7
+75,7
@@
$body = "";
for ($i=0; $i < count($body_ary); $i++) {
if ($i==0 && $forward_id) {
$body = "";
for ($i=0; $i < count($body_ary); $i++) {
if ($i==0 && $forward_id) {
- $tmp = "-------- " . _("Original Message") . " --------";
+ $tmp = "-------- " . _("Original Message") . " --------
\n
";
$tmp .= _("Subject") . ": " . $orig_header->subject . "\n";
$tmp .= " " . _("From") . ": " . $orig_header->from . "\n";
$tmp .= " " . _("To") . ": " . $orig_header->to[0] . "\n";
$tmp .= _("Subject") . ": " . $orig_header->subject . "\n";
$tmp .= " " . _("From") . ": " . $orig_header->from . "\n";
$tmp .= " " . _("To") . ": " . $orig_header->to[0] . "\n";
@@
-104,6
+104,7
@@
/** This formats a CC string if they hit "reply all" **/
if ($send_to_cc != "") {
/** This formats a CC string if they hit "reply all" **/
if ($send_to_cc != "") {
+ $send_to_cc = ereg_replace( '"[^"]*"', "", $send_to_cc);
$send_to_cc = ereg_replace(";", ",", $send_to_cc);
$sendcc = explode(",", $send_to_cc);
$send_to_cc = "";
$send_to_cc = ereg_replace(";", ",", $send_to_cc);
$sendcc = explode(",", $send_to_cc);
$send_to_cc = "";
@@
-151,7
+152,8
@@
echo "// --></SCRIPT>\n\n";
}
echo "// --></SCRIPT>\n\n";
}
- echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
+ echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
+ //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
if ($reply_id) {
echo "<input type=hidden name=reply_id value=$reply_id>\n";
}
if ($reply_id) {
echo "<input type=hidden name=reply_id value=$reply_id>\n";
}
@@
-270,6
+272,7
@@
echo "</TABLE>\n";
echo "</FORM>";
echo "</TABLE>\n";
echo "</FORM>";
+ do_hook("compose_bottom");
}
function showSentForm () {
}
function showSentForm () {
@@
-285,11
+288,7
@@
error message, show=true **/
global $body, $send_to, $subject, $color;
error message, show=true **/
global $body, $send_to, $subject, $color;
- if ($body == "" && $subject == "") {
- if ($show)
- plain_error_message(_("You have not entered a message body or a subject."), $color);
- return false;
- } else if ($send_to == "") {
+ if ($send_to == "") {
if ($show)
plain_error_message(_("You have not filled in the \"To:\" field."), $color);
return false;
if ($show)
plain_error_message(_("You have not filled in the \"To:\" field."), $color);
return false;
@@
-352,7
+351,7
@@
error_reporting(0); // Rename will produce error output if it fails
if (!rename($attachfile, $attachment_dir.$localfilename)) {
if (!copy($attachfile, $attachment_dir.$localfilename)) {
error_reporting(0); // Rename will produce error output if it fails
if (!rename($attachfile, $attachment_dir.$localfilename)) {
if (!copy($attachfile, $attachment_dir.$localfilename)) {
- plain_error_message(_("Could not move/copy file. File not attached"));
+ plain_error_message(_("Could not move/copy file. File not attached")
, $color
);
$failed = true;
}
}
$failed = true;
}
}
@@
-372,8
+371,8
@@
is_logged_in();
displayPageHeader($color, $mailbox);
is_logged_in();
displayPageHeader($color, $mailbox);
- while (list($key, $localname) = each($delete)) {
- array_splice ($attachments, $key, 1);
+ while (list($
l
key, $localname) = each($delete)) {
+ array_splice ($attachments, $
l
key, 1);
unlink ($attachment_dir.$localname);
unlink ($attachment_dir.$localname.".info");
}
unlink ($attachment_dir.$localname);
unlink ($attachment_dir.$localname.".info");
}