r52021 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52020‎ | r52021 | r52022 >
Date:06:23, 17 June 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Use addWikiMsg or wrapWikiMsg
Modified paths:
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialLinkSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -285,7 +285,7 @@
286286
287287 $pager = new DeletedContribsPager( $target, $options['namespace'] );
288288 if ( !$pager->getNumRows() ) {
289 - $wgOut->addWikiText( wfMsg( 'nocontribs' ) );
 289+ $wgOut->addWikiMsg( 'nocontribs' );
290290 return;
291291 }
292292
@@ -308,9 +308,7 @@
309309
310310 $text = wfMsgNoTrans( $message, $target );
311311 if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
312 - $wgOut->addHTML( '<div class="mw-contributions-footer">' );
313 - $wgOut->addWikiText( $text );
314 - $wgOut->addHTML( '</div>' );
 312+ $wgOut->wrapWikiMsg( "<div class='mw-contributions-footer'>\n$1\n</div>", array( $message, $target ) );
315313 }
316314 }
317315 }
Index: trunk/phase3/includes/specials/SpecialLinkSearch.php
@@ -48,7 +48,7 @@
4949
5050 $self = Title::makeTitle( NS_SPECIAL, 'Linksearch' );
5151
52 - $wgOut->addWikiText( wfMsg( 'linksearch-text', '<nowiki>' . $wgLang->commaList( $wgUrlProtocols) . '</nowiki>' ) );
 52+ $wgOut->addWikiMsg( 'linksearch-text', '<nowiki>' . $wgLang->commaList( $wgUrlProtocols ) . '</nowiki>' );
5353 $s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
5454 Xml::hidden( 'title', $self->getPrefixedDbKey() ) .
5555 '<fieldset>' .
@@ -164,7 +164,7 @@
165165 global $wgOut;
166166 list( $this->mMungedQuery, $clause ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
167167 if( $this->mMungedQuery === false ) {
168 - $wgOut->addWikiText( wfMsg( 'linksearch-error' ) );
 168+ $wgOut->addWikiMsg( 'linksearch-error' );
169169 } else {
170170 // For debugging
171171 // Generates invalid xhtml with patterns that contain --

Status & tagging log