(bug 22034) use wfClientAcceptsGzip() in wfGzipHandler instead of reimplementing it.
authorPlatonides <platonides@users.mediawiki.org>
Thu, 14 Jan 2010 16:35:35 +0000 (16:35 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 14 Jan 2010 16:35:35 +0000 (16:35 +0000)
$wgUseGzip check on wfClientAcceptsGzip() is removed since HTMLFileCache (the only wfClientAcceptsGzip() user) already checked that before calling it. This way, $wgUseGzip stays applying only for file cache, and $wgDisableOutputCompression for  output handler.

RELEASE-NOTES
includes/GlobalFunctions.php
includes/OutputHandler.php

index 2af828f..5856d04 100644 (file)
@@ -706,6 +706,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14717) Don't load nonexistent CSS fix files for non-Monobook skins
 * (bug 18765) Increased consistency of bold-italic markup for unbalanced quotes. 
   Improved representation of six quotes (may break existing markup).
+* (bug 22034) Use wfClientAcceptsGzip() in wfGzipHandler instead of
+  reimplementing it.
 
 == API changes in 1.16 ==
 
@@ -811,13 +813,13 @@ changes to languages because of MediaZilla reports.
 * Add Estonian letters äöõšüž to linktrail (et)
 * (bug 18776) Native name of Burmese language (my)
 * (bug 18806) Use correct unicode characters in spelling of native Chuvash
-  (Чӑвашла)
+  (???????)
 * (bug 18864) Updated autonym for Zhuang language
 * (bug 18308) Updated date formatting in Occitan (oc)
-* (bug 19080) Added ăâîşţșțĂÂÎŞŢȘȚ to Romanion (ro) linktrail
+* (bug 19080) Added aâîst??AÂÎST?? to Romanion (ro) linktrail
 * (bug 19286) Correct commafying function in Polish (pl)
 * (bug 19441) Updated date formatting for Lithuanian
-* (bug 19630) Added ÄäÇçĞğŇňÖöŞşÜüÝýŽž to Turkmen (tk) linktrail
+* (bug 19630) Added ÄäÇçGgNnÖöSsÜüÝýŽž to Turkmen (tk) linktrail
 * (bug 19949) New linktrail for Greek (el)
 * (bug 19809) Korean (North Korea) (ko-kp) (new)
 * (bug 19968) Fixed "Project talk" namespace name for Maltese (mt)
@@ -893,4 +895,4 @@ going to run a public MediaWiki, so you can be notified of security fixes.
 
 === IRC help ===
 
-There's usually someone online in #mediawiki on irc.freenode.net
+There's usually someone online 
\ No newline at end of file
index 363b643..1383303 100644 (file)
@@ -1167,8 +1167,7 @@ function wfNumLink( $offset, $limit, $title, $query = '' ) {
  * @return bool Whereas client accept gzip compression
  */
 function wfClientAcceptsGzip() {
-       global $wgUseGzip;
-       if( $wgUseGzip ) {
+       if( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
                # FIXME: we may want to blacklist some broken browsers
                $m = array();
                if( preg_match(
index 061f750..72e6562 100644 (file)
@@ -74,12 +74,9 @@ function wfGzipHandler( $s ) {
                return $s;
        }
 
-       if( isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) ) {
-               $tokens = preg_split( '/[,; ]/', $_SERVER['HTTP_ACCEPT_ENCODING'] );
-               if ( in_array( 'gzip', $tokens ) ) {
-                       header( 'Content-Encoding: gzip' );
-                       $s = gzencode( $s, 6 );
-               }
+       if( wfClientAcceptsGzip() ) {
+               header( 'Content-Encoding: gzip' );
+               $s = gzencode( $s, 6 );
        }
 
        // Set vary header if it hasn't been set already