Code Duplication    Length = 11-11 lines in 2 locations

Sources/ShowAttachments.php 1 location

@@ 277-287 (lines=11) @@
274
	$disposition = !isset($_REQUEST['image']) ? 'attachment' : 'inline';
275
276
	// Different browsers like different standards...
277
	if (isBrowser('firefox'))
278
		header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name)));
279
280
	elseif (isBrowser('opera'))
281
		header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name) . '"');
282
283
	elseif (isBrowser('ie'))
284
		header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name)) . '"');
285
286
	else
287
		header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"');
288
289
	// If this has an "image extension" - but isn't actually an image - then ensure it isn't cached cause of silly IE.
290
	if (!isset($_REQUEST['image']) && in_array($file['fileext'], array('gif', 'jpg', 'bmp', 'png', 'jpeg', 'tiff')))

Sources/Display.php 1 location

@@ 1689-1699 (lines=11) @@
1686
	$disposition = !isset($_REQUEST['image']) ? 'attachment' : 'inline';
1687
1688
	// Different browsers like different standards...
1689
	if (isBrowser('firefox'))
1690
		header('Content-Disposition: ' . $disposition . '; filename*=UTF-8\'\'' . rawurlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name)));
1691
1692
	elseif (isBrowser('opera'))
1693
		header('Content-Disposition: ' . $disposition . '; filename="' . preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name) . '"');
1694
1695
	elseif (isBrowser('ie'))
1696
		header('Content-Disposition: ' . $disposition . '; filename="' . urlencode(preg_replace_callback('~&#(\d{3,8});~', 'fixchar__callback', $utf8name)) . '"');
1697
1698
	else
1699
		header('Content-Disposition: ' . $disposition . '; filename="' . $utf8name . '"');
1700
1701
	// If this has an "image extension" - but isn't actually an image - then ensure it isn't cached cause of silly IE.
1702
	if (!isset($_REQUEST['image']) && in_array($file_ext, array('gif', 'jpg', 'bmp', 'png', 'jpeg', 'tiff')))