Merge "Fix param doc of ChangeTagsList::updateChangeTagsOnAll"
[lhc/web/wiklou.git] / includes / MediaWiki.php
index 69f23c1..7a6987e 100644 (file)
@@ -260,8 +260,16 @@ class MediaWiki {
                                        ) {
                                                list( , $subpage ) = $spFactory->resolveAlias( $title->getDBkey() );
                                                $target = $specialPage->getRedirect( $subpage );
-                                               // target can also be true. We let that case fall through to normal processing.
+                                               // Target can also be true. We let that case fall through to normal processing.
                                                if ( $target instanceof Title ) {
+                                                       if ( $target->isExternal() ) {
+                                                               // Handle interwiki redirects
+                                                               $target = SpecialPage::getTitleFor(
+                                                                       'GoToInterwiki',
+                                                                       'force/' . $target->getPrefixedDBkey()
+                                                               );
+                                                       }
+
                                                        $query = $specialPage->getRedirectQuery( $subpage ) ?: [];
                                                        $request = new DerivativeRequest( $this->context->getRequest(), $query );
                                                        $request->setRequestURL( $this->context->getRequest()->getRequestURL() );