$fields = array( "oldtitle", "newtitle" );
wfCleanFormFields( $fields );
- $text = str_replace( "$1", $oldtitle, wfMsg( "pagemovedtext" ) );
- $text = str_replace( "$2", $newtitle, $text );
+ $text = wfMsg( "pagemovedtext", $oldtitle, $newtitle );
$wgOut->addWikiText( $text );
if ( 1 == $talkmoved ) {
return;
}
$nt = Title::newFromURL( $target );
- $sub = str_replace( "$1", $nt->getPrefixedText(), wfMsg( "rclsub" ) );
- $wgOut->setSubtitle( $sub );
+ $wgOut->setSubtitle( wfMsg( "rclsub", $nt->getPrefixedText() ) );
if ( ! $days ) {
$days = $wgUser->getOption( "rcdays" );
$sk = $wgUser->getSkin();
$s = "<ol start=" . ( $offset + 1 ) . ">";
while ( $obj = wfFetchObject( $res ) ) {
- $nb = str_replace( "$1", $obj->len, wfMsg( "nbytes" ) );
+ $nb = wfMsg( "nbytes", $obj->len );
$link = $sk->makeKnownLink( $obj->cur_title, "" );
$s .= "<li>{$link} ({$nb})</li>\n";
}
$edits = $row->ss_total_edits;
$good = $row->ss_good_articles;
- $text = str_replace( "$1", $total, wfMsg( "sitestatstext" ) );
- $text = str_replace( "$2", $good, $text );
- $text = str_replace( "$3", $views, $text );
- $text = str_replace( "$4", $edits, $text );
- $text = str_replace( "$5", sprintf( "%.2f", $total ? $edits / $total : 0 ), $text );
- $text = str_replace( "$6", sprintf( "%.2f", $edits ? $views / $edits : 0 ), $text );
+ $text = wfMsg( "sitestatstext",
+ $total, $good, $views, $edits,
+ sprintf( "%.2f", $total ? $edits / $total : 0 ),
+ sprintf( "%.2f", $edits ? $views / $edits : 0 ) );
$wgOut->addHTML( $text );
$wgOut->addHTML( "<h2>" . wfMsg( "userstats" ) . "</h2>\n" );
$sk = $wgUser->getSkin();
$ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
- $text = str_replace( "$1", $total, wfMsg( "userstatstext" ) );
- $text = str_replace( "$2", $admins, $text );
- $text = str_replace( "$3", $ap, $text );
+ $text = wfMsg( "userstatstext", $total, $admins, $ap );
$wgOut->addHTML( $text );
}
$wgOut->addHTML( "<li>" .
$sk->makeKnownLink( $wgLang->specialPage( "Undelete" ),
$n, "target=" . urlencode($n) ) . " " .
- str_replace( '$1', $row->count, wfMsg( "undeleterevisions" )) );
+ wfMsg( "undeleterevisions", $row->count ) );
}
$wgOut->addHTML( "</ul>\n" );
$row = wfFetchObject( $ret );
$wgOut->setPagetitle( wfMsg( "undeletepage" ) );
- $wgOut->addWikiText( "(" . str_replace("$1",
- $wgLang->date($timestamp, true), wfMsg( "undeleterevision" ))
+ $wgOut->addWikiText( "(" . wfMsg( "undeleterevision", $wgLang->date($timestamp, true) )
. ")\n<hr>\n" . $row->ar_text );
return 0;
$log = new LogPage( wfMsg( "dellogpage" ), wfMsg( "dellogpagetext" ) );
$log->addEntry( wfMsg( "undeletedarticle", $target ), "" );
- $wgOut->addwikitext(str_replace("$1", $target, wfmsg("undeletedtext")));
+ $wgOut->addWikiText( wfMsg( "undeletedtext", $target ) );
return 0;
}
?>
$wgOut->setPagetitle( wfMsg( "unlockdb" ) );
$wgOut->setSubtitle( wfMsg( "unlockdbsuccesssub" ) );
- $text = str_replace( "$1", $ip, wfMsg( "unlockdbsuccesstext" ) );
- $wgOut->addWikiText( $text );
+ $wgOut->addWikiText( wfMsg( "unlockdbsuccesstext", $ip ) );
}
}
saveUploadedFile();
if ( ( ! $wpIgnoreWarning ) &&
( 0 != strcmp( ucfirst( $basename ), $wpUploadSaveName ) ) ) {
- $warn = str_replace( "$1", $wpUploadSaveName,
- wfMsg( "badfilename" ) );
- return uploadWarning( $warn );
+ return uploadWarning( wfMsg( "badfilename", $wpUploadSaveName ) );
}
$extensions = array( "png", "jpg", "jpeg", "ogg" );
if ( ( ! $wpIgnoreWarning ) &&
( ! in_array( strtolower( $ext ), $extensions ) ) ) {
- $warn = str_replace( "$1", $ext, wfMsg( "badfiletype" ) );
- return uploadWarning( $warn );
+ return uploadWarning( wfMsg( "badfiletype", $ext ) );
}
if ( ( ! $wpIgnoreWarning ) && ( $wpUploadSize > 150000 ) ) {
return uploadWarning( WfMsg( "largefile" ) );
$dlink = $sk->makeKnownLink( $dname, $dname );
$wgOut->addHTML( "<h2>" . wfMsg( "successfulupload" ) . "</h2>\n" );
- $text = str_replace( "$1", $ilink, wfMsg( "fileuploaded" ) );
- $text = str_replace( "$2", $dlink, $text );
+ $text = wfMsg( "fileuploaded", $ilink, $dlink );
$wgOut->addHTML( "<p>{$text}\n" );
$wgOut->returnToMain( false );
}
$clink = $sk->makeKnownLink( wfMsg( "copyrightpage" ),
wfMsg( "copyrightpagename" ) );
- $ca = str_replace( "$1", $clink, wfMsg( "affirmation" ) );
+ $ca = wfMsg( "affirmation", $clink );
$iw = wfMsg( "ignorewarning" );
$action = wfLocalUrl( $wgLang->specialPage( "Upload" ) );