$entryWarning = $this->msg( $request->getVal( 'warning', '' ) );
// bc: provide login link as a parameter for messages where the translation
// was not updated
- $loginreqlink = Linker::linkKnown(
+ $loginreqlink = $this->getLinkRenderer()->makeKnownLink(
$this->getPageTitle(),
- $this->msg( 'loginreqlink' )->escaped(),
+ $this->msg( 'loginreqlink' )->text(),
[],
[
'returnto' => $this->mReturnTo,
# 1. When switching accounts, it sucks to get automatically logged out
# 2. Do not return to PasswordReset after a successful password change
- # but goto Wiki start page (Main_Page) instead ( bug 33997 )
+ # but goto Wiki start page (Main_Page) instead ( T35997 )
$returnToTitle = Title::newFromText( $this->mReturnTo );
if ( is_object( $returnToTitle )
&& ( $returnToTitle->isSpecial( 'Userlogout' )
* @return HTMLForm
*/
protected function getAuthForm( array $requests, $action, $msg = '', $msgType = 'error' ) {
- global $wgSecureLogin, $wgLoginLanguageSelector;
+ global $wgSecureLogin;
// FIXME merge this with parent
if ( isset( $this->authForm ) ) {
$form = HTMLForm::factory( 'vform', $formDescriptor, $context );
$form->addHiddenField( 'authAction', $this->authAction );
- if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+ if ( $this->mLanguage ) {
$form->addHiddenField( 'uselang', $this->mLanguage );
}
$form->addHiddenField( 'force', $this->securityLevel );
*/
protected function getFakeTemplate( $msg, $msgType ) {
global $wgAuth, $wgEnableEmail, $wgHiddenPrefs, $wgEmailConfirmToEdit, $wgEnableUserEmail,
- $wgSecureLogin, $wgLoginLanguageSelector, $wgPasswordResetRoutes;
+ $wgSecureLogin, $wgPasswordResetRoutes;
// make a best effort to get the value of fields which used to be fixed in the old login
// template but now might or might not exist depending on what providers are used
$user = $this->getUser();
$template = new FakeAuthTemplate();
- // Pre-fill username (if not creating an account, bug 44775).
+ // Pre-fill username (if not creating an account, T46775).
if ( $data->mUsername == '' && $this->isSignup() ) {
if ( $user->isLoggedIn() ) {
$data->mUsername = $user->getName();
# Don't show a "create account" link if the user can't.
if ( $this->showCreateAccountLink() ) {
# Pass any language selection on to the mode switch link
- if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+ if ( $this->mLanguage ) {
$linkq .= '&uselang=' . $this->mLanguage;
}
// Supply URL, login template creates the button.
$resetLink = $this->isSignup()
? null
: is_array( $wgPasswordResetRoutes )
- && in_array( true, array_values( $wgPasswordResetRoutes ), true );
+ && in_array( true, array_values( $wgPasswordResetRoutes ), true );
$template->set( 'header', '' );
$template->set( 'formheader', '' );
* @return array
*/
protected function getFieldDefinitions( $template ) {
- global $wgEmailConfirmToEdit, $wgLoginLanguageSelector;
+ global $wgEmailConfirmToEdit;
$isLoggedIn = $this->getUser()->isLoggedIn();
$continuePart = $this->isContinued() ? 'continue-' : '';
// B/C for old extensions that haven't been converted to AuthManager (or have been
// but somebody is using the old version) and still use templates via the
// UserCreateForm/UserLoginForm hook.
- // 'header' used by ConfirmEdit, CondfirmAccount, Persona, WikimediaIncubator, SemanticSignup
+ // 'header' used by ConfirmEdit, ConfirmAccount, Persona, WikimediaIncubator, SemanticSignup
// 'formheader' used by MobileFrontend
$fieldDefinitions['header'] = [
'type' => 'info',
'raw' => true,
'default' => $template->get( 'header' ) ?: $template->get( 'formheader' ),
- 'weight' => - 110,
+ 'weight' => -110,
];
}
if ( $this->mEntryError ) {
'type' => 'info',
'raw' => true,
'cssclass' => 'mw-form-related-link-container',
- 'default' => Linker::link(
+ 'default' => $this->getLinkRenderer()->makeLink(
SpecialPage::getTitleFor( 'PasswordReset' ),
- $this->msg( 'userlogin-resetpassword-link' )->escaped()
+ $this->msg( 'userlogin-resetpassword-link' )->text()
),
'weight' => 230,
];
$linkTitle = $this->getTitleFor( $this->isSignup() ? 'Userlogin' :'CreateAccount' );
$linkq = $this->getReturnToQueryStringFragment();
// Pass any language selection on to the mode switch link
- if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+ if ( $this->mLanguage ) {
$linkq .= '&uselang=' . $this->mLanguage;
}
$loggedIn = $this->getUser()->isLoggedIn();
$targetLanguage = Language::factory( $lang );
$attr['lang'] = $attr['hreflang'] = $targetLanguage->getHtmlCode();
- return Linker::linkKnown(
+ return $this->getLinkRenderer()->makeKnownLink(
$this->getPageTitle(),
- htmlspecialchars( $text ),
+ $text,
$attr,
$query
);