r79544 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79543‎ | r79544 | r79545 >
Date:01:35, 4 January 2011
Author:soxred93
Status:ok
Tags:
Comment:
Followup to r79532: Did I really need to implement a parameter? No, I did not.
Modified paths:
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/api/format/ApiFormatTestBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/api/format/ApiFormatTestBase.php
@@ -13,7 +13,7 @@
1414 $printer = $module->createPrinterByName( $format );
1515 $printer->setUnescapeAmps(false);
1616
17 - $printer->initPrinter(false, true);
 17+ $printer->initPrinter(false);
1818
1919 ob_start();
2020 $printer->execute();
Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -145,9 +145,11 @@
146146 if ( is_null( $mime ) ) {
147147 return; // skip any initialization
148148 }
 149+
 150+ if( !$this->getMain()->isInternalMode() ) {
 151+ header( "Content-Type: $mime; charset=utf-8" );
 152+ }
149153
150 - header( "Content-Type: $mime; charset=utf-8" );
151 -
152154 if ( $isHtml ) {
153155 ?>
154156 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79532Add API format testingsoxred9321:36, 3 January 2011

Status & tagging log