From: Alexandre Emsenhuber Date: Thu, 2 Apr 2009 20:38:25 +0000 (+0000) Subject: * (bug 18289) Database connection error page now returns correct HTML X-Git-Tag: 1.31.0-rc.0~42246 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=724890645589cbe716aa0cc5ef572879d3b66090;p=lhc%2Fweb%2Fwiklou.git * (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 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ccb608a915..437e3d9307 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -317,6 +317,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 18291) rebuildrecentchanges.php failed to add deletion log entries * (bug 18304) rebuildrecentchanges.php got size changes wrong * (bug 18170) Fixed a PHP warning in Parser::preSaveTransform() in PHP 5.3 +* (bug 18289) Database connection error page now returns correct HTML == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/includes/Exception.php b/includes/Exception.php index 5f808b2043..dc5b72d43a 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -202,7 +202,7 @@ class MWException extends Exception { header( 'Pragma: nocache' ); } $title = $this->getPageTitle(); - echo " + return " $title @@ -215,7 +215,7 @@ class MWException extends Exception { * print the end of the html page if not using $wgOut. */ function htmlFooter() { - echo ""; + return ""; } /** @@ -297,7 +297,7 @@ function wfReportException( Exception $e ) { wfPrintError( $message ); } else { echo nl2br( htmlspecialchars( $message ) ). "\n"; - } + } } } else { $message = "Unexpected non-MediaWiki exception encountered, of type \"" . get_class( $e ) . "\"\n" . @@ -322,8 +322,7 @@ function wfPrintError( $message ) { # Try to produce meaningful output anyway. Using echo may corrupt output to STDOUT though. if ( defined( 'STDERR' ) ) { fwrite( STDERR, $message ); - } - else { + } else { echo( $message ); } }