* (bug 50870) mediawiki.notification: Notification area should remain visible
when scrolled down.
* (bug 13438) Special:MIMESearch no longer an expensive special page.
+* (bug 48342) Fixed a fatal error when $wgValidateAllHtml is set to true and
+ the function apache_request_headers() function is not available.
=== API changes in 1.22 ===
* (bug 25553) The JSON output formatter now leaves forward slashes unescaped
global $wgDisableOutputCompression, $wgValidateAllHtml;
$s = wfMangleFlashPolicy( $s );
if ( $wgValidateAllHtml ) {
- $headers = apache_response_headers();
- $isHTML = true;
- foreach ( $headers as $name => $value ) {
- if ( strtolower( $name ) == 'content-type' && strpos( $value, 'text/html' ) === false && strpos( $value, 'application/xhtml+xml' ) === false ) {
- $isHTML = false;
+ $headers = headers_list();
+ $isHTML = false;
+ foreach ( $headers as $header ) {
+ $parts = explode( ':', $header, 2 );
+ if ( count( $parts ) !== 2 ) {
+ continue;
+ }
+ $name = strtolower( trim( $parts[0] ) );
+ $value = trim( $parts[1] );
+ if ( $name == 'content-type' && ( strpos( $value, 'text/html' ) === 0
+ || strpos( $value, 'application/xhtml+xml' ) === 0 )
+ ) {
+ $isHTML = true;
break;
}
}