Followup r103817, updating setLang usages
This commit is contained in:
parent
900e5acb91
commit
51a6eadec1
4 changed files with 22 additions and 2 deletions
|
|
@ -158,9 +158,19 @@ class DerivativeContext extends ContextSource {
|
|||
/**
|
||||
* Set the Language object
|
||||
*
|
||||
* @deprecated 1.19 Use setLanguage instead
|
||||
* @param $l Mixed Language instance or language code
|
||||
*/
|
||||
public function setLang( $l ) {
|
||||
$this->setLanguage( $l );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Language object
|
||||
*
|
||||
* @param $l Mixed Language instance or language code
|
||||
*/
|
||||
public function setLanguage( $l ) {
|
||||
if ( $l instanceof Language ) {
|
||||
$this->lang = $l;
|
||||
} elseif ( is_string( $l ) ) {
|
||||
|
|
|
|||
|
|
@ -165,9 +165,19 @@ class RequestContext implements IContextSource {
|
|||
/**
|
||||
* Set the Language object
|
||||
*
|
||||
* @deprecated 1.19 Use setLanguage instead
|
||||
* @param $l Mixed Language instance or language code
|
||||
*/
|
||||
public function setLang( $l ) {
|
||||
$this->setLanguage( $l );
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Language object
|
||||
*
|
||||
* @param $l Mixed Language instance or language code
|
||||
*/
|
||||
public function setLanguage( $l ) {
|
||||
if ( $l instanceof Language ) {
|
||||
$this->lang = $l;
|
||||
} elseif ( is_string( $l ) ) {
|
||||
|
|
|
|||
|
|
@ -3250,7 +3250,7 @@ class Parser {
|
|||
$context->setTitle( $title );
|
||||
$context->setRequest( new FauxRequest( $pageArgs ) );
|
||||
$context->setUser( $this->getUser() );
|
||||
$context->setLang( $this->mOptions->getUserLangObj() );
|
||||
$context->setLanguage( $this->mOptions->getUserLangObj() );
|
||||
$ret = SpecialPageFactory::capturePath( $title, $context );
|
||||
if ( $ret ) {
|
||||
$text = $context->getOutput()->getHTML();
|
||||
|
|
|
|||
|
|
@ -744,7 +744,7 @@ class LoginForm extends SpecialPage {
|
|||
$code = $request->getVal( 'uselang', $user->getOption( 'language' ) );
|
||||
$userLang = Language::factory( $code );
|
||||
$wgLang = $userLang;
|
||||
$this->getContext()->setLang( $userLang );
|
||||
$this->getContext()->setLanguage( $userLang );
|
||||
return $this->successfulLogin();
|
||||
} else {
|
||||
return $this->cookieRedirectCheck( 'login' );
|
||||
|
|
|
|||
Loading…
Reference in a new issue