porting site notice feature from REL1_3A
This commit is contained in:
parent
4f323f50e1
commit
e1b5e3f57f
1 changed files with 19 additions and 0 deletions
|
|
@ -364,6 +364,25 @@ wfSeedRandom();
|
|||
$wgTitle = Title::makeTitle( NS_SPECIAL, 'Error' );
|
||||
$wgArticle = new Article($wgTitle);
|
||||
|
||||
# Site notice
|
||||
|
||||
$notice = wfMsg( 'sitenotice' );
|
||||
if($notice == '<sitenotice>') $notice = '';
|
||||
# Allow individual wikis to turn it off
|
||||
if ( $notice == '-' ) {
|
||||
$wgSiteNotice = '';
|
||||
} else {
|
||||
# if($wgSiteNotice) $notice .= $wgSiteNotice;
|
||||
if ($notice == '') {
|
||||
$notice = $wgSiteNotice;
|
||||
}
|
||||
if($notice != '-' && $notice != '') {
|
||||
$specialparser = new Parser();
|
||||
$parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false );
|
||||
$wgSiteNotice = $parserOutput->getText();
|
||||
}
|
||||
}
|
||||
|
||||
wfProfileOut( $fname.'-misc2' );
|
||||
wfProfileIn( $fname.'-extensions' );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue