*/
public function setUser( User $user ) {
$this->user = $user;
+ // Invalidate cached user interface language
+ $this->lang = null;
}
/**
$obj = Language::factory( $code );
$this->lang = $obj;
}
-
- unset( $this->recursion );
- }
- catch ( Exception $ex ) {
+ } finally {
unset( $this->recursion );
- throw $ex;
}
}
if ( $this->skin === null ) {
$skin = null;
Hooks::run( 'RequestContextCreateSkin', [ $this, &$skin ] );
- $factory = SkinFactory::getDefaultInstance();
+ $factory = MediaWikiServices::getInstance()->getSkinFactory();
// If the hook worked try to set a skin from it
if ( $skin instanceof Skin ) {