function wfEmergencyAbort( &$conn ) {
global $wgTitle, $wgUseFileCache, $title, $wgInputEncoding, $wgSiteNotice, $wgOutputEncoding;
- header( "Content-type: text/html; charset=$wgOutputEncoding" );
+ if( !headers_sent() ) {
+ header( "HTTP/1.0 500 Internal Server Error" );
+ header( "Content-type: text/html; charset=$wgOutputEncoding" );
+ /* Don't cache error pages! They cause no end of trouble... */
+ header( "Cache-control: none" );
+ header( "Pragma: nocache" );
+ }
$msg = $wgSiteNotice;
if($msg == "") $msg = wfMsgNoDB( "noconnect" );
$text = $msg;
}
}
- /* Don't cache error pages! They cause no end of trouble... */
- header( "Cache-control: none" );
- header( "Pragma: nocache" );
echo $text;
wfAbruptExit();
}