Index: trunk/phase3/tests/phpunit/includes/api/format/ApiFormatTestBase.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | $printer = $module->createPrinterByName( $format ); |
15 | 15 | $printer->setUnescapeAmps(false); |
16 | 16 | |
17 | | - $printer->initPrinter(false, true); |
| 17 | + $printer->initPrinter(false); |
18 | 18 | |
19 | 19 | ob_start(); |
20 | 20 | $printer->execute(); |
Index: trunk/phase3/includes/api/ApiFormatBase.php |
— | — | @@ -145,9 +145,11 @@ |
146 | 146 | if ( is_null( $mime ) ) { |
147 | 147 | return; // skip any initialization |
148 | 148 | } |
| 149 | + |
| 150 | + if( !$this->getMain()->isInternalMode() ) { |
| 151 | + header( "Content-Type: $mime; charset=utf-8" ); |
| 152 | + } |
149 | 153 | |
150 | | - header( "Content-Type: $mime; charset=utf-8" ); |
151 | | - |
152 | 154 | if ( $isHtml ) { |
153 | 155 | ?> |
154 | 156 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |