Use stripos() instead of strpos( strtolower() ). Props hakre. see #16920
git-svn-id: http://svn.automattic.com/wordpress/trunk@17630 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1615,7 +1615,7 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
|
||||
$language = $initArray['language'];
|
||||
|
||||
$compressed = $compress_scripts && $concatenate_scripts && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
|
||||
&& false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip');
|
||||
&& false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
|
||||
@@ -134,10 +134,10 @@ header("Cache-Control: public, max-age=$expires_offset");
|
||||
|
||||
if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
||||
header('Vary: Accept-Encoding'); // Handle proxies
|
||||
if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
|
||||
if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
|
||||
header('Content-Encoding: deflate');
|
||||
$out = gzdeflate( $out, 3 );
|
||||
} elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) {
|
||||
} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
|
||||
header('Content-Encoding: gzip');
|
||||
$out = gzencode( $out, 3 );
|
||||
}
|
||||
|
||||
@@ -134,10 +134,10 @@ header("Cache-Control: public, max-age=$expires_offset");
|
||||
|
||||
if ( $compress && ! ini_get('zlib.output_compression') && 'ob_gzhandler' != ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) ) {
|
||||
header('Vary: Accept-Encoding'); // Handle proxies
|
||||
if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
|
||||
if ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
|
||||
header('Content-Encoding: deflate');
|
||||
$out = gzdeflate( $out, 3 );
|
||||
} elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) {
|
||||
} elseif ( false !== stripos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
|
||||
header('Content-Encoding: gzip');
|
||||
$out = gzencode( $out, 3 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user