Browse Source

I think it should be like that, but I don't remember why...

Signed-off-by: emanuele <[email protected]>
emanuele 11 years ago
parent
commit
ea32b99e74
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Sources/ManageAttachments.php

+ 3 - 3
Sources/ManageAttachments.php

@@ -2706,6 +2706,9 @@ function TransferAttachments()
 			$moved = array();
 			while ($row = $smcFunc['db_fetch_assoc']($request))
 			{
+				$source = getAttachmentFilename($row['filename'], $row['id_attach'], $row['id_folder'], false, $row['file_hash']);
+				$dest = $modSettings['attachmentUploadDir'][$new_dir] . '/' . basename($source);
+
 				// Size and file count check
 				if (!empty($modSettings['attachmentDirSizeLimit']) || !empty($modSettings['attachmentDirFileLimit']))
 				{
@@ -2741,9 +2744,6 @@ function TransferAttachments()
 					}
 				}
 
-				$source = getAttachmentFilename($row['filename'], $row['id_attach'], $row['id_folder'], false, $row['file_hash']);
-				$dest = $modSettings['attachmentUploadDir'][$new_dir] . '/' . basename($source);
-
 				if (@rename($source, $dest))
 				{
 					$total_moved++;