Merge "Rename BlockRestriction -> BlockRestrictionStore and wire it up as a service"
[lhc/web/wiklou.git] / includes / context / RequestContext.php
index 2cbe67c..aada514 100644 (file)
@@ -345,12 +345,8 @@ class RequestContext implements IContextSource, MutableContext {
                                        $obj = Language::factory( $code );
                                        $this->lang = $obj;
                                }
-
-                               unset( $this->recursion );
-                       }
-                       catch ( Exception $ex ) {
+                       } finally {
                                unset( $this->recursion );
-                               throw $ex;
                        }
                }
 
@@ -372,7 +368,7 @@ class RequestContext implements IContextSource, MutableContext {
                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 ) {