$user = $this->getUser();
if( !$request->wasPosted() && !$user->isLoggedIn() ) {
- $this->error( wfMsg( 'resetpass-no-info' ) );
+ $this->error( $this->msg( 'resetpass-no-info' )->text() );
return;
}
}
$wgAuth->setDomain( $this->mDomain );
if( !$wgAuth->allowPasswordChange() ) {
- $this->error( wfMsg( 'resetpass_forbidden' ) );
+ $this->error( $this->msg( 'resetpass_forbidden' )->text() );
return;
}
'<td></td>' .
'<td class="mw-input">' .
Xml::checkLabel(
- wfMsgExt( 'remembermypassword', 'parsemag', $this->getLanguage()->formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) ),
+ $this->msg( 'remembermypassword' )->numParams( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) )->text(),
'wpRemember', 'wpRemember',
$this->getRequest()->getCheck( 'wpRemember' ) ) .
'</td>' .
$submitMsg = 'resetpass-submit-loggedin';
}
$this->getOutput()->addHTML(
- Xml::fieldset( wfMsg( 'resetpass_header' ) ) .
+ Xml::fieldset( $this->msg( 'resetpass_header' )->text() ) .
Xml::openElement( 'form',
array(
'method' => 'post',
Html::hidden( 'wpName', $this->mUserName ) . "\n" .
Html::hidden( 'wpDomain', $this->mDomain ) . "\n" .
Html::hidden( 'returnto', $this->getRequest()->getVal( 'returnto' ) ) . "\n" .
- wfMsgExt( 'resetpass_text', array( 'parse' ) ) . "\n" .
+ $this->msg( 'resetpass_text' )->parseAsBlock() . "\n" .
Xml::openElement( 'table', array( 'id' => 'mw-resetpass-table' ) ) . "\n" .
$this->pretty( array(
array( 'wpName', 'username', 'text', $this->mUserName ),
"<tr>\n" .
"<td></td>\n" .
'<td class="mw-input">' .
- Xml::submitButton( wfMsg( $submitMsg ) ) .
- Xml::submitButton( wfMsg( 'resetpass-submit-cancel' ), array( 'name' => 'wpCancel' ) ) .
+ Xml::submitButton( $this->msg( $submitMsg )->text() ) .
+ Xml::submitButton( $this->msg( 'resetpass-submit-cancel' )->text(), array( 'name' => 'wpCancel' ) ) .
"</td>\n" .
"</tr>\n" .
Xml::closeElement( 'table' ) .
$out .= "<tr>\n";
$out .= "\t<td class='mw-label'>";
if ( $type != 'text' )
- $out .= Xml::label( wfMsg( $label ), $name );
+ $out .= Xml::label( $this->msg( $label )->text(), $name );
else
- $out .= wfMsgHtml( $label );
+ $out .= $this->msg( $label )->escaped();
$out .= "</td>\n";
$out .= "\t<td class='mw-input'>";
$out .= $field;
protected function attemptReset( $newpass, $retype ) {
$user = User::newFromName( $this->mUserName );
if( !$user || $user->isAnon() ) {
- throw new PasswordError( wfMsg( 'nosuchusershort', $this->mUserName ) );
+ throw new PasswordError( $this->msg( 'nosuchusershort', $this->mUserName )->text() );
}
if( $newpass !== $retype ) {
wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'badretype' ) );
- throw new PasswordError( wfMsg( 'badretype' ) );
+ throw new PasswordError( $this->msg( 'badretype' )->text() );
}
$throttleCount = LoginForm::incLoginThrottle( $this->mUserName );
if ( $throttleCount === true ) {
- throw new PasswordError( wfMsg( 'login-throttled' ) );
+ throw new PasswordError( $this->msg( 'login-throttled' )->text() );
}
if( !$user->checkTemporaryPassword($this->mOldpass) && !$user->checkPassword($this->mOldpass) ) {
wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'wrongpassword' ) );
- throw new PasswordError( wfMsg( 'resetpass-wrong-oldpass' ) );
+ throw new PasswordError( $this->msg( 'resetpass-wrong-oldpass' )->text() );
}
// Please reset throttle for successful logins, thanks!