From: Rob Church Date: Fri, 30 Jun 2006 09:13:53 +0000 (+0000) Subject: (bug 6493) Preserve language selections in the mode switch link on Special:Userlogin X-Git-Tag: 1.31.0-rc.0~56514 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=de3a806942a6da3241cb5056b5e06dc906f756af;p=lhc%2Fweb%2Fwiklou.git (bug 6493) Preserve language selections in the mode switch link on Special:Userlogin --- diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 53d69971b9..93f5d71f3b 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -83,7 +83,7 @@ class CategoryPage extends Article { $limit = $wgCategoryPagingLimit; $res = $dbr->select( array( 'page', 'categorylinks' ), - array( 'page_title', 'page_namespace', 'page_len', 'cl_sortkey' ), + array( 'page_title', 'page_namespace', 'page_is_redirect', 'page_len', 'cl_sortkey' ), array( $pageCondition, 'cl_from = page_id', 'cl_to' => $this->mTitle->getDBKey()), diff --git a/includes/SpecialUserlogin.php b/includes/SpecialUserlogin.php index 6a605fdc65..4ee35b1bfb 100644 --- a/includes/SpecialUserlogin.php +++ b/includes/SpecialUserlogin.php @@ -474,10 +474,8 @@ class LoginForm { * @private */ function mainLoginForm( $msg, $msgtype = 'error' ) { - global $wgUser, $wgOut; - global $wgAllowRealName, $wgEnableEmail; - global $wgCookiePrefix; - global $wgAuth; + global $wgUser, $wgOut, $wgAllowRealName, $wgEnableEmail; + global $wgCookiePrefix, $wgAuth, $wgLoginLanguageSelector; if ( $this->mType == 'signup' && !$wgUser->isAllowedToCreateAccount() ) { $this->userNotPrivilegedMessage(); @@ -514,6 +512,10 @@ class LoginForm { $q .= $returnto; $linkq .= $returnto; } + + # Pass any language selection on to the mode switch link + if( $wgLoginLanguageSelector && $this->mLanguage ) + $linkq .= '&uselang=' . $this->mLanguage; $link = ''; $link .= wfMsgHtml( $linkmsg . 'link' ); @@ -541,7 +543,7 @@ class LoginForm { $template->set( 'useemail', $wgEnableEmail ); $template->set( 'remember', $wgUser->getOption( 'rememberpassword' ) or $this->mRemember ); - global $wgLoginLanguageSelector; + # Prepare language selection links as needed if( $wgLoginLanguageSelector ) { $template->set( 'languages', $this->makeLanguageSelector() ); if( $this->mLanguage )