Code Duplication    Length = 5-7 lines in 2 locations

index.php 1 location

@@ 91-97 (lines=7) @@
88
if (!empty($modSettings['enableCompressedOutput']) && !headers_sent())
89
{
90
	// If zlib is being used, turn off output compression.
91
	if (ini_get('zlib.output_compression') >= 1 || ini_get('output_handler') == 'ob_gzhandler')
92
		$modSettings['enableCompressedOutput'] = '0';
93
	else
94
	{
95
		ob_end_clean();
96
		ob_start('ob_gzhandler');
97
	}
98
}
99
100
/**

Sources/ShowAttachments.php 1 location

@@ 43-47 (lines=5) @@
40
41
	if (!empty($modSettings['enableCompressedOutput']) && !headers_sent() && ob_get_length() == 0)
42
	{
43
		if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler')
44
			$modSettings['enableCompressedOutput'] = 0;
45
46
		else
47
			ob_start('ob_gzhandler');
48
	}
49
50
	if (empty($modSettings['enableCompressedOutput']))