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;
}
}
is_logged_in();
displayPageHeader($color, $mailbox);
- while (list($key, $localname) = each($delete)) {
- array_splice ($attachments, $key, 1);
+ while (list($lkey, $localname) = each($delete)) {
+ array_splice ($attachments, $lkey, 1);
unlink ($attachment_dir.$localname);
unlink ($attachment_dir.$localname.".info");
}