* (bug 675) Add page protection level for unregistered/new accounts
* User::isNewbie now uses the registration date and $wgAutoconfirmAge
* Log views show message when no matches
+* Fix raw sitenotice display on database error
=== Caveats ===
wfLogDBError( "Connection error: $error\n" );
- $msg = wfGetSiteNotice();
- if($msg == '') {
- $msg = str_replace( '$1', $error, $noconnect );
- }
- $text = $msg;
+ $text = str_replace( '$1', $error, $noconnect );
+ $text .= wfGetSiteNotice();
if($wgUseFileCache) {
if($wgTitle) {
$notice = $wgSiteNotice;
}
if($notice != '-' && $notice != '') {
- $notice = $wgOut->parse( $notice );
+ if( is_object( $wgOut ) ) {
+ $notice = $wgOut->parse( $notice );
+ } else {
+ wfDebug( "wfGetSiteNotice called with no \$wgOut available" );
+ $notice = '';
+ }
}
wfProfileOut( $fname );
return $notice;