}
$log = new LogPage( wfMsg( "uploadlogpage" ), wfMsg( "uploadlogpagetext" ) );
- $da = str_replace( "$1", "[[:" . $wgLang->getNsText(
- Namespace::getImage() ) . ":{$name}|{$name}]]",
- wfMsg( "uploadedimage" ) );
- $ta = str_replace( "$1", $name, wfMsg( "uploadedimage" ) );
+ $da = wfMsg( "uploadedimage", "[[:" . $wgLang->getNsText(
+ Namespace::getImage() ) . ":{$name}|{$name}]]" );
+ $ta = wfMsg( "uploadedimage", $name );
$log->addEntry( $da, $desc, $ta );
}
function wfShowingResults( $offset, $limit )
{
- $top = str_replace( "$1", $limit, wfMsg( "showingresults" ) );
- $top = str_replace( "$2", $offset+1, $top );
- return $top;
+ return wfMsg( "showingresults", $limit, $offset+1 );
}
function wfShowingResultsNum( $offset, $limit, $num )
{
- $top = str_replace( "$1", $limit, wfMsg( "showingresultsnum" ) );
- $top = str_replace( "$2", $offset+1, $top );
- $top = str_replace( "$3", $num, $top );
- return $top;
+ return wfMsg( "showingresultsnum", $limit, $offset+1, $num );
}
function wfViewPrevNext( $offset, $limit, $link, $query = "" )
{
global $wgUser;
- $prev = str_replace( "$1", $limit, wfMsg( "prevn" ) );
- $next = str_replace( "$1", $limit, wfMsg( "nextn" ) );
+ $prev = wfMsg( "prevn", $limit );
+ $next = wfMsg( "nextn", $limit );
$sk = $wgUser->getSkin();
if ( 0 != $offset ) {
wfNumLink( $offset, 250, $link, $query ) . " | " .
wfNumLink( $offset, 500, $link, $query );
- $sl = str_replace( "$1", $plink, wfMsg( "viewprevnext" ) );
- $sl = str_replace( "$2", $nlink, $sl );
- $sl = str_replace( "$3", $nums, $sl );
- return $sl;
+ return wfMsg( "viewprevnext", $plink, $nlink, $nums );
}
function wfNumLink( $offset, $limit, $link, $query = "" )
$sk = $wgUser->getSkin();
$ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
- $text = str_replace( "$1", $ap, wfMsg( "sysoptext" ) );
- $this->addHTML( $text );
+ $this->addHTML( wfMsg( "sysoptext", $ap ) );
$this->returnToMain();
}
$sk = $wgUser->getSkin();
$ap = $sk->makeKnownLink( wfMsg( "administrators" ), "" );
- $text = str_replace( "$1", $ap, wfMsg( "developertext" ) );
- $this->addHTML( $text );
+ $this->addHTML( wfMsg( "developertext", $ap ) );
$this->returnToMain();
}
if ( $wgCommandLineMode ) {
$msg = wfMsgNoDB( "dberrortextcl" );
} else {
- $msg = wfMsgNoDB( "dberrortextcl" );
+ $msg = wfMsgNoDB( "dberrortext" );
}
$msg = str_replace( "$1", htmlspecialchars( wfLastDBquery() ), $msg );
function unexpectedValueError( $name, $val )
{
- $msg = str_replace( "$1", $name, wfMsg( "unexpected" ) );
- $msg = str_replace( "$2", $val, $msg );
- $this->fatalError( $msg );
+ $this->fatalError( wfMsg( "unexpected", $name, $val ) );
}
function fileCopyError( $old, $new )
{
- $msg = str_replace( "$1", $old, wfMsg( "filecopyerror" ) );
- $msg = str_replace( "$2", $new, $msg );
- $this->fatalError( $msg );
+ $this->fatalError( wfMsg( "filecopyerror", $old, $new ) );
}
function fileRenameError( $old, $new )
{
- $msg = str_replace( "$1", $old, wfMsg( "filerenameerror" ) );
- $msg = str_replace( "$2", $new, $msg );
- $this->fatalError( $msg );
+ $this->fatalError( wfMsg( "filerenameerror", $old, $new ) );
}
function fileDeleteError( $name )
{
- $msg = str_replace( "$1", $name, wfMsg( "filedeleteerror" ) );
- $this->fatalError( $msg );
+ $this->fatalError( wfMsg( "filedeleteerror", $name ) );
}
function fileNotFoundError( $name )
{
- $msg = str_replace( "$1", $name, wfMsg( "filenotfound" ) );
- $this->fatalError( $msg );
+ $this->fatalError( wfMsg( "filenotfound", $name ) );
}
function returnToMain( $auto = true )
}
$link = $sk->makeKnownLink( $returnto, "" );
- $r = str_replace( "$1", $link, wfMsg( "returnto" ) );
+ $r = wfMsg( "returnto", $link );
if ( $auto ) {
$wgOut->addMeta( "http:Refresh", "10;url=" .
wfLocalUrlE( wfUrlencode( $returnto ) ) );
if ( count ( $articles ) > 0 )
{
asort ( $articles ) ;
- $h = str_replace ( "$1" , $ti[1] , wfMsg("category_header") ) ;
+ $h = wfMsg( "category_header", $ti[1] );
$r .= "<h2>{$h}</h2>\n" ;
$r .= implode ( ", " , $articles ) ;
}