Browse Source

Merge changes on Profile-Modify.php

Signed-off-by: Suki <[email protected]>
Suki 10 years ago
parent
commit
4d034990ea
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Sources/Profile-Modify.php

+ 1 - 1
Sources/Profile-Modify.php

@@ -3084,7 +3084,7 @@ function profileSaveAvatarData(&$value)
 				$cur_profile['filename'] = $destName;
 				$cur_profile['attachment_type'] = 1;
 
-				$destinationPath = $uploadDir . '/' . $destName;
+				$destinationPath = $uploadDir . '/' . (empty($file_hash) ? $destName : $cur_profile['id_attach'] . '_' . $file_hash . '.dat');
 				if (!rename($_FILES['attachment']['tmp_name'], $destinationPath))
 				{
 					// I guess a man can try.