r26933 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26932‎ | r26933 | r26934 >
Date:19:34, 24 October 2007
Author:amidaniel
Status:old
Tags:
Comment:
(bug 11721) API: Use a different title for results than for the help page.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -320,7 +320,6 @@
321321 protected function printResult($isError) {
322322 $printer = $this->mPrinter;
323323 $printer->profileIn();
324 - $printer->initPrinter($isError);
325324
326325 /* If the help message is requested in the default (xmlfm) format,
327326 * tell the printer not to escape ampersands so that our links do
@@ -329,6 +328,8 @@
330329 $printer->setUnescapeAmps ( $this->mAction == 'help'
331330 && $params['format'] == ApiMain::API_DEFAULT_FORMAT );
332331
 332+ $printer->initPrinter($isError);
 333+
333334 $printer->execute();
334335 $printer->closePrinter();
335336 $printer->profileOut();
Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -111,7 +111,11 @@
112112 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
113113 <html>
114114 <head>
115 - <title>MediaWiki API</title>
 115+<? if ($this->mUnescapeAmps) {
 116+?> <title>MediaWiki API</title>
 117+<? } else {
 118+?> <title>MediaWiki API Result</title>
 119+<? } ?>
116120 </head>
117121 <body>
118122 <?php
Index: trunk/phase3/RELEASE-NOTES
@@ -140,6 +140,7 @@
141141 * Add rctype parameter to list=recentchanges that filters by type
142142 * Add apprtype and apprlevel parameters to filter list=allpages by protection types and levels
143143 * Add apdir parameter to enable listing all pages from Z to A
 144+* (bug 11721) Use a different title for results than for the help page.
144145
145146 === Languages updated in 1.12 ===
146147

Status & tagging log