Code Duplication    Length = 5-8 lines in 2 locations

Sources/Subs.php 2 locations

@@ 3285-3292 (lines=8) @@
3282
			}
3283
3284
			// We are already checking so many files...just few more doesn't make any difference! :P
3285
			if (!empty($modSettings['currentAttachmentUploadDir']))
3286
				$path = $modSettings['attachmentUploadDir'][$modSettings['currentAttachmentUploadDir']];
3287
3288
			else
3289
			{
3290
				$path = $modSettings['attachmentUploadDir'];
3291
				$id_folder_thumb = 1;
3292
			}
3293
			secureDirectory($path, true);
3294
			secureDirectory($cachedir);
3295
@@ 3716-3720 (lines=5) @@
3713
		$file_hash = sha1(md5($filename . time()) . mt_rand());
3714
3715
	// Are we using multiple directories?
3716
	if (!empty($modSettings['currentAttachmentUploadDir']))
3717
		$path = $modSettings['attachmentUploadDir'][$dir];
3718
3719
	else
3720
		$path = $modSettings['attachmentUploadDir'];
3721
3722
	return $path . '/' . $attachment_id . '_' . $file_hash .'.dat';
3723
}