José Loguercio 8 years ago
parent
commit
eb68161465
1 changed files with 1 additions and 2 deletions
  1. 1 2
      main/inc/lib/AnnouncementManager.php

+ 1 - 2
main/inc/lib/AnnouncementManager.php

@@ -1384,8 +1384,7 @@ class AnnouncementManager
             } else {
                 $new_file_name = uniqid('');
                 $new_path = $updir . '/' . $new_file_name;
-		// This file is copy here but its cleaned in api_mail_html in api.lib.php
-                copy($file['tmp_name'], $new_path);
+                @move_uploaded_file($file['tmp_name'], $new_path);
                 $safe_file_comment = Database::escape_string($file_comment);
                 $safe_file_name = Database::escape_string($file_name);
                 $safe_new_file_name = Database::escape_string($new_file_name);