r43958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43957‎ | r43958 | r43959 >
Date:23:26, 25 November 2008
Author:tomasz
Status:ok
Tags:
Comment:
Pull a revision instead of a wfMsg in order to preserve inc: tags
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -281,9 +281,10 @@
282282 $languages = Language::getLanguageNames();
283283 $htmlOut .= Xml::element( 'th', array( 'width' => '40%' ), $languages[$wpUserLang] );
284284
285 - $body = wfMsg( "Centralnotice-template-{$currentTemplate}" );
286 -
287 - // Generate fields from parsing the body
 285+ // Pull text and respect any inc: markup
 286+ $bodyPage = Title::newFromText( "Centralnotice-template-{$currentTemplate}", NS_MEDIAWIKI );
 287+ $body = Revision::newFromTitle( $bodyPage )->getText();
 288+
288289 $fields = array();
289290 preg_match_all( '/\{\{\{([A-Za-z0-9\_\-}]+)\}\}\}/', $body, $fields );
290291

Status & tagging log