LoginForm::addNewAccountInternal() to two new functions,
User::isValidUserName() and User::isValidPassword(), extensions can now do
these checks without rewriting code.
-
+* Fix $wgSiteNotice when MediaWiki:Sitenotice is set to default '-'
=== Caveats ===
wfProfileIn( $fname );
$notice = wfMsg( 'sitenotice' );
- if($notice == '<sitenotice>') $notice = '';
- # Allow individual wikis to turn it off
- if ( $notice == '-' ) {
+ if( $notice == '<sitenotice>' || $notice == '-' ) {
$notice = '';
- } else {
- if ($notice == '') {
- $notice = $wgSiteNotice;
- }
- if($notice != '-' && $notice != '') {
- $specialparser = new Parser();
- $parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false );
- $notice = $parserOutput->getText();
- }
+ }
+ if( $notice == '' ) {
+ # We may also need to override a message with eg downtime info
+ # FIXME: make this work!
+ $notice = $wgSiteNotice;
+ }
+ if($notice != '-' && $notice != '') {
+ $specialparser = new Parser();
+ $parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false );
+ $notice = $parserOutput->getText();
}
wfProfileOut( $fname );
return $notice;