Revert "RedirectSpecialPage: handle interwiki redirects."
authorKrinkle <krinklemail@gmail.com>
Tue, 16 Jul 2019 11:50:30 +0000 (11:50 +0000)
committerKrinkle <krinklemail@gmail.com>
Tue, 16 Jul 2019 11:50:30 +0000 (11:50 +0000)
This reverts commit 41106688abbe6dfff61c5642924ced42af3f0d33.

The original case is changed by this commit from a MediaWiki fatal
exception with HTTP 500, to a blank 200 response due to silent
failure. Use of GoToInterwiki appears to be invalid at this point in
the code. Reverting to keep prod the same as last week, so as
to unblock the train.

Bug: T227700
Change-Id: Ieece956d2e2e4c21b5ed7a75890b9f11eaf07e66

includes/MediaWiki.php

index 3934cd2..69f23c1 100644 (file)
@@ -260,16 +260,8 @@ 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',
-                                                                       $target->getPrefixedDBkey()
-                                                               );
-                                                       }
-
                                                        $query = $specialPage->getRedirectQuery( $subpage ) ?: [];
                                                        $request = new DerivativeRequest( $this->context->getRequest(), $query );
                                                        $request->setRequestURL( $this->context->getRequest()->getRequestURL() );