Code Duplication    Length = 10-11 lines in 2 locations

Sources/Subs-Package.php 2 locations

@@ 2675-2685 (lines=11) @@
2672
{
2673
	global $package_cache, $modSettings;
2674
2675
	if (!isset($package_cache))
2676
	{
2677
2678
		$mem_check = setMemoryLimit('128M');
2679
2680
		// Windows doesn't seem to care about the memory_limit.
2681
		if (!empty($modSettings['package_disable_cache']) || $mem_check || stripos(PHP_OS, 'win') !== false)
2682
			$package_cache = array();
2683
		else
2684
			$package_cache = false;
2685
	}
2686
2687
	if (strpos($filename, 'Packages/') !== false || $package_cache === false || !isset($package_cache[$filename]))
2688
		return file_get_contents($filename);
@@ 2710-2719 (lines=10) @@
2707
	global $package_ftp, $package_cache, $modSettings;
2708
	static $text_filetypes = array('php', 'txt', '.js', 'css', 'vbs', 'tml', 'htm');
2709
2710
	if (!isset($package_cache))
2711
	{
2712
		// Try to increase the memory limit - we don't want to run out of ram!
2713
		$mem_check = setMemoryLimit('128M');
2714
2715
		if (!empty($modSettings['package_disable_cache']) || $mem_check || stripos(PHP_OS, 'win') !== false)
2716
			$package_cache = array();
2717
		else
2718
			$package_cache = false;
2719
	}
2720
2721
	if (isset($package_ftp))
2722
		$ftp_file = strtr($filename, array($_SESSION['pack_ftp']['root'] => ''));