this makes it consistent with WebRequest::get* methods. Corrected code in
various places accordingly.
* (bug 8264) Fix JavaScript global vars for XHTML mode
+* Make $wgSiteNotice value wikitext again, for consistency with editable
+ MediaWiki:Sitenotice and MediaWiki:Anonnotice.
== Languages updated ==
wfProfileIn( $fname );
$needParse = false;
- $notice = wfMsgForContent( $name );
- if( wfEmptyMsg( $name, $notice ) || $notice == '-' ) {
- wfProfileOut( $fname );
- return( false );
+
+ if( $name === 'default' ) {
+ // special case
+ global $wgSiteNotice;
+ $notice = $wgSiteNotice;
+ if( empty( $notice ) ) {
+ wfProfileOut( $fname );
+ return false;
+ }
+ } else {
+ $notice = wfMsgForContent( $name );
+ if( wfEmptyMsg( $name, $notice ) || $notice == '-' ) {
+ wfProfileOut( $fname );
+ return( false );
+ }
}
$cachedNotice = $parserMemc->get( wfMemcKey( $name ) );
if( wfRunHooks( 'SiteNoticeBefore', array( &$siteNotice ) ) ) {
if( is_object( $wgUser ) && $wgUser->isLoggedIn() ) {
$siteNotice = wfGetCachedNotice( 'sitenotice' );
- $siteNotice = !$siteNotice ? $wgSiteNotice : $siteNotice;
} else {
$anonNotice = wfGetCachedNotice( 'anonnotice' );
if( !$anonNotice ) {
$siteNotice = wfGetCachedNotice( 'sitenotice' );
- $siteNotice = !$siteNotice ? $wgSiteNotice : $siteNotice;
} else {
$siteNotice = $anonNotice;
}
}
+ if( !$siteNotice ) {
+ $siteNotice = wfGetCachedNotice( 'default' );
+ }
}
wfRunHooks( 'SiteNoticeAfter', array( &$siteNotice ) );