r6787 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r6786‎ | r6787 | r6788 >
Date:09:10, 23 December 2004
Author:timstarling
Status:old
Tags:
Comment:
porting site notice feature from REL1_3A
Modified paths:
  • /branches/REL1_4/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/includes/Setup.php
@@ -368,6 +368,25 @@
369369 $wgTitle = Title::makeTitle( NS_SPECIAL, 'Error' );
370370 $wgArticle = new Article($wgTitle);
371371
 372+# Site notice
 373+
 374+$notice = wfMsg( 'sitenotice' );
 375+if($notice == '<sitenotice>') $notice = '';
 376+# Allow individual wikis to turn it off
 377+if ( $notice == '-' ) {
 378+ $wgSiteNotice = '';
 379+} else {
 380+ # if($wgSiteNotice) $notice .= $wgSiteNotice;
 381+ if ($notice == '') {
 382+ $notice = $wgSiteNotice;
 383+ }
 384+ if($notice != '-' && $notice != '') {
 385+ $specialparser = new Parser();
 386+ $parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false );
 387+ $wgSiteNotice = $parserOutput->getText();
 388+ }
 389+}
 390+
372391 wfProfileOut( $fname.'-misc2' );
373392 wfProfileIn( $fname.'-extensions' );
374393

Status & tagging log