Code Duplication    Length = 3-3 lines in 2 locations

Sources/ManageAttachments.php 2 locations

@@ 2022-2024 (lines=3) @@
2019
					if (!empty($modSettings['attachment_basedirectories']))
2020
					{
2021
						// Count any sub-folders.
2022
						foreach ($modSettings['attachmentUploadDir'] as $sub)
2023
							if (strpos($sub, $path . DIRECTORY_SEPARATOR) !== false)
2024
								$num_attach++;
2025
					}
2026
2027
					// It's safe to delete. So try to delete the folder also
@@ 2526-2528 (lines=3) @@
2523
	{
2524
		// Loop through the attach directory array to count any sub-directories
2525
		$expected_dirs = 0;
2526
		foreach ($modSettings['attachmentUploadDir'] as $sid => $sub)
2527
			if (strpos($sub, $dir . DIRECTORY_SEPARATOR) !== false)
2528
				$expected_dirs++;
2529
2530
		if (!is_dir($dir))
2531
			$status = 'does_not_exist';