X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=includes%2FOutputHandler.php;h=c9c326b150b1b5b5cb1dafeed335e9cf6abd1c0f;hb=932c37e3cb1708965ca52622dc23b9c4a635f304;hp=c6209eebcfbb47ea77b3dabe2d295ba7aaca954a;hpb=44aec8a00a9f0f92a746ca575b58147fea1135e5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index c6209eebcf..c9c326b150 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -137,9 +137,9 @@ function wfGzipHandler( $s ) { } if ( !$foundVary ) { header( 'Vary: Accept-Encoding' ); - global $wgUseXVO; - if ( $wgUseXVO ) { - header( 'X-Vary-Options: Accept-Encoding;list-contains=gzip' ); + global $wgUseKeyHeader; + if ( $wgUseKeyHeader ) { + header( 'Key: Accept-Encoding;match=gzip' ); } } return $s; @@ -162,7 +162,7 @@ function wfMangleFlashPolicy( $s ) { } /** - * Add a Content-Length header if possible. This makes it cooperate with squid better. + * Add a Content-Length header if possible. This makes it cooperate with CDN better. * * @param int $length */ @@ -195,13 +195,13 @@ function wfHtmlValidationHandler( $s ) { $out .= Html::openElement( 'ul' ); $error = strtok( $errors, "\n" ); - $badLines = array(); + $badLines = []; while ( $error !== false ) { if ( preg_match( '/^line (\d+)/', $error, $m ) ) { $lineNum = intval( $m[1] ); $badLines[$lineNum] = true; $out .= Html::rawElement( 'li', null, - Html::element( 'a', array( 'href' => "#line-{$lineNum}" ), $error ) ) . "\n"; + Html::element( 'a', [ 'href' => "#line-{$lineNum}" ], $error ) ) . "\n"; } $error = strtok( "\n" ); } @@ -212,7 +212,7 @@ function wfHtmlValidationHandler( $s ) { $line = strtok( $s, "\n" ); $i = 1; while ( $line !== false ) { - $attrs = array(); + $attrs = []; if ( isset( $badLines[$i] ) ) { $attrs['class'] = 'highlight'; $attrs['id'] = "line-$i"; @@ -228,7 +228,7 @@ function wfHtmlValidationHandler( $s ) { li { white-space: pre } CSS; - $out = Html::htmlHeader( array( 'lang' => 'en', 'dir' => 'ltr' ) ) . + $out = Html::htmlHeader( [ 'lang' => 'en', 'dir' => 'ltr' ] ) . Html::rawElement( 'head', null, Html::element( 'title', null, 'HTML validation error' ) . Html::inlineStyle( $style ) ) .