r6788 MediaWiki - Code Review archive

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

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -364,6 +364,25 @@
365365 $wgTitle = Title::makeTitle( NS_SPECIAL, 'Error' );
366366 $wgArticle = new Article($wgTitle);
367367
 368+# Site notice
 369+
 370+$notice = wfMsg( 'sitenotice' );
 371+if($notice == '<sitenotice>') $notice = '';
 372+# Allow individual wikis to turn it off
 373+if ( $notice == '-' ) {
 374+ $wgSiteNotice = '';
 375+} else {
 376+ # if($wgSiteNotice) $notice .= $wgSiteNotice;
 377+ if ($notice == '') {
 378+ $notice = $wgSiteNotice;
 379+ }
 380+ if($notice != '-' && $notice != '') {
 381+ $specialparser = new Parser();
 382+ $parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false );
 383+ $wgSiteNotice = $parserOutput->getText();
 384+ }
 385+}
 386+
368387 wfProfileOut( $fname.'-misc2' );
369388 wfProfileIn( $fname.'-extensions' );
370389

Status & tagging log