Merge "Allow users who are partially blocked to delete revisions."
[lhc/web/wiklou.git] / includes / MediaWiki.php
index 69f23c1..f91477a 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() );
@@ -737,7 +745,7 @@ class MediaWiki {
                        Profiler::instance()->logDataPageOutputOnly();
                } catch ( Exception $e ) {
                        // An error may already have been shown in run(), so just log it to be safe
-                       MWExceptionHandler::rollbackMasterChangesAndLog( $e );
+                       MWExceptionHandler::logException( $e );
                }
 
                // Disable WebResponse setters for post-send processing (T191537).