r49146 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49145‎ | r49146 | r49147 >
Date:20:38, 2 April 2009
Author:ialex
Status:ok
Tags:
Comment:
* (bug 18289) Database connection error page now returns correct HTML
Changed MWException::htmlHeader() and MWException::htmlFooter() to return the HTML rather than echo()'ing directly
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Exception.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Exception.php
@@ -202,7 +202,7 @@
203203 header( 'Pragma: nocache' );
204204 }
205205 $title = $this->getPageTitle();
206 - echo "<html>
 206+ return "<html>
207207 <head>
208208 <title>$title</title>
209209 </head>
@@ -215,7 +215,7 @@
216216 * print the end of the html page if not using $wgOut.
217217 */
218218 function htmlFooter() {
219 - echo "</body></html>";
 219+ return "</body></html>";
220220 }
221221
222222 /**
@@ -297,7 +297,7 @@
298298 wfPrintError( $message );
299299 } else {
300300 echo nl2br( htmlspecialchars( $message ) ). "\n";
301 - }
 301+ }
302302 }
303303 } else {
304304 $message = "Unexpected non-MediaWiki exception encountered, of type \"" . get_class( $e ) . "\"\n" .
@@ -322,8 +322,7 @@
323323 # Try to produce meaningful output anyway. Using echo may corrupt output to STDOUT though.
324324 if ( defined( 'STDERR' ) ) {
325325 fwrite( STDERR, $message );
326 - }
327 - else {
 326+ } else {
328327 echo( $message );
329328 }
330329 }
Index: trunk/phase3/RELEASE-NOTES
@@ -317,6 +317,7 @@
318318 * (bug 18291) rebuildrecentchanges.php failed to add deletion log entries
319319 * (bug 18304) rebuildrecentchanges.php got size changes wrong
320320 * (bug 18170) Fixed a PHP warning in Parser::preSaveTransform() in PHP 5.3
 321+* (bug 18289) Database connection error page now returns correct HTML
321322
322323 == API changes in 1.15 ==
323324 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Status & tagging log