- 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"));
+ // This shouldn't be here... Ondrej Sury <ondrej@sury.cz>
+ //$tmp=explode('/',$attachfile);
+ //$attachfile=$tmp[count($tmp)-1];
+ //$attachfile=ereg_replace('\.{2,}','',$attachfile);
+
+ //error_reporting(0); // Rename will produce error output if it fails
+ //if (!rename($attachfile, $attachment_dir.$localfilename)) {
+ // if (!copy($attachfile, $attachment_dir.$localfilename)) {
+ if (!@rename($attachfile, $attachment_dir.$localfilename)) {
+ if (!@copy($attachfile, $attachment_dir.$localfilename)) {
+ plain_error_message(_("Could not move/copy file. File not attached"), $color);