r44569 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44568‎ | r44569 | r44570 >
Date:08:31, 14 December 2008
Author:tstarling
Status:ok
Tags:
Comment:
Backported r43470, redundant fix for Rem1.
Modified paths:
  • /branches/REL1_13/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /branches/REL1_13/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: branches/REL1_13/phase3/includes/api/ApiMain.php
@@ -403,7 +403,7 @@
404404 * tell the printer not to escape ampersands so that our links do
405405 * not break. */
406406 $printer->setUnescapeAmps ( ( $this->mAction == 'help' || $isError )
407 - && $this->getParameter('format') == ApiMain::API_DEFAULT_FORMAT );
 407+ && $printer->getFormat() == 'XML' && $printer->getIsHtml() );
408408
409409 $printer->initPrinter($isError);
410410
Index: branches/REL1_13/phase3/includes/api/ApiFormatBase.php
@@ -70,6 +70,13 @@
7171 }
7272
7373 /**
 74+ * Get the internal format name
 75+ */
 76+ public function getFormat() {
 77+ return $this->mFormat;
 78+ }
 79+
 80+ /**
7481 * Specify whether or not ampersands should be escaped to '&' when rendering. This
7582 * should only be set to true for the help message when rendered in the default (xmlfm)
7683 * format. This is a temporary special-case fix that should be removed once the help

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r43470Don't use getParameter() inside substituteResultWithError(), since it will tr...tstarling00:30, 14 November 2008

Status & tagging log