Followup to r79532: Did I really need to implement a parameter? No, I did not.
authorX! <soxred93@users.mediawiki.org>
Tue, 4 Jan 2011 01:35:01 +0000 (01:35 +0000)
committerX! <soxred93@users.mediawiki.org>
Tue, 4 Jan 2011 01:35:01 +0000 (01:35 +0000)
includes/api/ApiFormatBase.php
tests/phpunit/includes/api/format/ApiFormatTestBase.php

index 5d233e0..91562f2 100644 (file)
@@ -145,8 +145,10 @@ abstract class ApiFormatBase extends ApiBase {
                if ( is_null( $mime ) ) {
                        return; // skip any initialization
                }
-
-               header( "Content-Type: $mime; charset=utf-8" );
+               
+               if( !$this->getMain()->isInternalMode() ) {
+                       header( "Content-Type: $mime; charset=utf-8" );
+               }
 
                if ( $isHtml ) {
 ?>
index 96800c5..cf60d5e 100644 (file)
@@ -13,7 +13,7 @@ abstract class ApiFormatTestBase extends ApiTestSetup {
                $printer = $module->createPrinterByName( $format );
                $printer->setUnescapeAmps(false);
 
-               $printer->initPrinter(false, true);
+               $printer->initPrinter(false);
 
                ob_start();
                $printer->execute();