$t = $wgTitle->getPrefixedText() . " (Diff: {$this->mOldid}, " .
"{$this->mNewid})";
- $mtext = str_replace( "$1", $t, wfMsg( "missingarticle" ) );
+ $mtext = wfMsg( "missingarticle", $t );
$wgOut->setArticleFlag( false );
if ( ! $this->loadText() ) {
$this->mNewtext = $s->old_text;
$t = $wgLang->timeanddate( $s->old_timestamp, true );
- $this->mNewtitle = str_replace( "$1", "{$t}",
- wfMsg( "revisionasof" ) );
+ $this->mNewtitle = wfMsg( "revisionasof", $t );
}
if ( 0 == $this->mOldid ) {
$sql = "SELECT old_timestamp,old_text FROM old USE INDEX (name_title_timestamp) WHERE " .
$this->mOldtext = $s->old_text;
$t = $wgLang->timeanddate( $s->old_timestamp, true );
- $this->mOldtitle = str_replace( "$1", "{$t}",
- wfMsg( "revisionasof" ) );
+ $this->mOldtitle = wfMsg( "revisionasof", $t );
return true;
}
}
function _block_header( $xbeg, $xlen, $ybeg, $ylen ) {
- $l1 = str_replace( "$1", $xbeg, wfMsg( "lineno" ) );
- $l2 = str_replace( "$1", $ybeg, wfMsg( "lineno" ) );
+ $l1 = wfMsg( "lineno", $xbeg );
+ $l2 = wfMsg( "lineno", $ybeg );
$r = "<tr><td colspan=2 align=left><strong>{$l1}</strong></td>\n" .
"<td colspan=2 align=left><strong>{$l2}</strong></td></tr>\n";
$wgOut->setArticleFlag( false );
if ( $isConflict ) {
- $s = str_replace( "$1", $this->mTitle->getPrefixedText(),
- wfMsg( "editconflict" ) );
+ $s = wfMsg( "editconflict", $this->mTitle->getPrefixedText() );
$wgOut->setPageTitle( $s );
$wgOut->addHTML( wfMsg( "explainconflict" ) );
$wpTextbox1 = $this->mArticle->getContent(true);
$wpEdittime = $this->mArticle->getTimestamp();
} else {
- $s = str_replace( "$1", $this->mTitle->getPrefixedText(),
- wfMsg( "editing" ) );
+ $s = wfMsg( "editing", $this->mTitle->getPrefixedText() );
if($section!="") {
if($section=="new") {
$kblength = (int)(strlen( $wpTextbox1 ) / 1024);
if( $kblength > 29 ) {
$wgOut->addHTML( "<strong>" .
- str_replace( '$1', $kblength , wfMsg( "longpagewarning" ) )
+ wfMsg( "longpagewarning", $kblength )
. "</strong>" );
}
wfMsg( "cancel" ) );
$edithelp = $sk->makeKnownLink( wfMsg( "edithelppage" ),
wfMsg( "edithelp" ) );
- $copywarn = str_replace( "$1", $sk->makeKnownLink(
- wfMsg( "copyrightpage" ) ), wfMsg( "copyrightwarning" ) );
+ $copywarn = wfMsg( "copyrightwarning", $sk->makeKnownLink(
+ wfMsg( "copyrightpage" ) ) );
$wpTextbox1 = wfEscapeHTML( $wpTextbox1 );
$wpTextbox2 = wfEscapeHTML( $wpTextbox2 );
$link = "[[" . $wgLang->getNsText( Namespace::getUser() ) .
":{$name}|{$name}]]";
- $text = str_replace( "$1", $link, wfMsg( "blockedtext" ) );
- $text = str_replace( "$2", $reason, $text );
- $wgOut->addWikiText( $text );
+ $wgOut->addWikiText( wfMsg( "blockedtext", $link, $reason ) );
$wgOut->returnToMain( false );
}