global $wgOut, $wpEmail, $wpName;
if ("" == $wpEmail) {
- $m = str_replace( "$1", $wpName, wfMsg( "noemail" ) );
- mainLoginForm( $m );
+ mainLoginForm( wfMsg( "noemail", $wpName ) );
return;
}
$wgOut->setRobotpolicy( "noindex,nofollow" );
$wgOut->setArticleFlag( false );
- $m = str_replace( "$1", $u->getName(), wfMsg( "accmailtext" ) );
- $m = str_replace( "$2", $u->getEmail(), $m );
- $wgOut->addWikiText( $m );
+ $wgOut->addWikiText( wfMsg( "accmailtext", $u->getName(), $u->getEmail() ) );
$wgOut->returnToMain( false );
$u = 0;
}
$wgUser = $u;
- $m = str_replace( "$1", $wgUser->getName(), wfMsg( "welcomecreation" ) );
- successfulLogin( $m );
+ successfulLogin( wfMsg( "welcomecreation", $wgUser->getName() ) );
}
$u = User::newFromName( $wpName );
$id = $u->idForName();
if ( 0 == $id ) {
- $m = str_replace( "$1", $u->getName(), wfMsg( "nosuchuser" ) );
- mainLoginForm( $m );
+ mainLoginForm( wfMsg( "nosuchuser", $u->getName() ) );
return;
}
$u->setId( $id );
$u->setOption( "rememberpassword", $r );
$wgUser = $u;
- $m = str_replace( "$1", $wgUser->getName(), wfMsg( "loginsuccess" ) );
- successfulLogin( $m );
+ successfulLogin( wfMsg( "loginsuccess", $wgUser->getName() ) );
}
/* private */ function mailPassword()
$u = User::newFromName( $wpName );
$id = $u->idForName();
if ( 0 == $id ) {
- $m = str_replace( "$1", $u->getName(), wfMsg( "nosuchuser" ) );
- mainLoginForm( $m );
+ mainLoginForm( wfMsg( "nosuchuser", $u->getName() ) );
return;
}
$u->setId( $id );
return;
}
- $m = str_replace( "$1", $u->getName(), wfMsg( "passwordsent" ) );
- mainLoginForm( $m );
+ mainLoginForm( wfMsg( "passwordsent", $u->getName() ) );
}
global $wgPasswordSender;
if ( "" == $u->getEmail() ) {
- $m = str_replace( "$1", $u->getName(), wfMsg( "noemail" ) );
- mainLoginForm( $m );
+ mainLoginForm( wfMsg( "noemail", $u->getName() ) );
return;
}
$np = User::randomPassword();
$ip = getenv( "REMOTE_ADDR" );
if ( "" == $ip ) { $ip = "(Unknown)"; }
- $m = str_replace( "$1", $ip, wfMsg( "passwordremindertext" ) );
- $m = str_replace( "$2", $u->getName(), $m );
- $m = str_replace( "$3", $np, $m );
+ $m = wfMsg( "passwordremindertext", $ip, $u->getName(), $np );
mail( $u->getEmail(), wfMsg( "passwordremindertitle" ), $m,
"MIME-Version: 1.0\r\n" .