From ecaa365c5d42413b6b5f755ecf0a2813cada6ad5 Mon Sep 17 00:00:00 2001 From: kink Date: Sat, 11 Jan 2003 13:52:15 +0000 Subject: [PATCH] Since we're requiring PHP >= 4.0.4, we can just use move_upload_file because it was added in 4.0.3. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4414 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/compose.php b/src/compose.php index 33332825..fd7e07cc 100644 --- a/src/compose.php +++ b/src/compose.php @@ -1176,17 +1176,10 @@ function saveAttachedFiles($session) { $full_localfilename = "$hashed_attachment_dir/$localfilename"; } - if (!@rename($_FILES['attachfile']['tmp_name'], $full_localfilename)) { - if (function_exists("move_uploaded_file")) { - if (!@move_uploaded_file($_FILES['attachfile']['tmp_name'],$full_localfilename)) { - return true; - } - } else { - if (!@copy($_FILES['attachfile']['tmp_name'], $full_localfilename)) { - return true; - } - } + if (!@move_uploaded_file($_FILES['attachfile']['tmp_name'],$full_localfilename)) { + return true; } + $message = $compose_messages[$session]; $type = strtolower($_FILES['attachfile']['type']); $name = $_FILES['attachfile']['name']; -- 2.25.1