Use addWikiMsg or wrapWikiMsg
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 17 Jun 2009 06:23:07 +0000 (06:23 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 17 Jun 2009 06:23:07 +0000 (06:23 +0000)
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialLinkSearch.php

index 7593be9..e0b1161 100644 (file)
@@ -285,7 +285,7 @@ class DeletedContributionsPage extends SpecialPage {
 
                $pager = new DeletedContribsPager( $target, $options['namespace'] );
                if ( !$pager->getNumRows() ) {
-                       $wgOut->addWikiText( wfMsg( 'nocontribs' ) );
+                       $wgOut->addWikiMsg( 'nocontribs' );
                        return;
                }
 
@@ -308,9 +308,7 @@ class DeletedContributionsPage extends SpecialPage {
 
                        $text = wfMsgNoTrans( $message, $target );
                        if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
-                               $wgOut->addHTML( '<div class="mw-contributions-footer">' );
-                               $wgOut->addWikiText( $text );
-                               $wgOut->addHTML( '</div>' );
+                               $wgOut->wrapWikiMsg( "<div class='mw-contributions-footer'>\n$1\n</div>", array( $message, $target ) );
                        }
                }
        }
index 242c8ec..5c343ed 100644 (file)
@@ -48,7 +48,7 @@ function wfSpecialLinkSearch( $par ) {
 
        $self = Title::makeTitle( NS_SPECIAL, 'Linksearch' );
 
-       $wgOut->addWikiText( wfMsg( 'linksearch-text', '<nowiki>' . $wgLang->commaList( $wgUrlProtocols) . '</nowiki>' ) );
+       $wgOut->addWikiMsg( 'linksearch-text', '<nowiki>' . $wgLang->commaList( $wgUrlProtocols ) . '</nowiki>' );
        $s =    Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
                Xml::hidden( 'title', $self->getPrefixedDbKey() ) .
                '<fieldset>' .
@@ -164,7 +164,7 @@ class LinkSearchPage extends QueryPage {
                global $wgOut;
                list( $this->mMungedQuery, $clause ) = LinkSearchPage::mungeQuery( $this->mQuery, $this->mProt );
                if( $this->mMungedQuery === false ) {
-                       $wgOut->addWikiText( wfMsg( 'linksearch-error' ) );
+                       $wgOut->addWikiMsg( 'linksearch-error' );
                } else {
                        // For debugging
                        // Generates invalid xhtml with patterns that contain --