diff options
Diffstat (limited to 'includes/specials/SpecialMyLanguage.php')
-rw-r--r-- | includes/specials/SpecialMyLanguage.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/specials/SpecialMyLanguage.php b/includes/specials/SpecialMyLanguage.php index 71b18930..6cea1581 100644 --- a/includes/specials/SpecialMyLanguage.php +++ b/includes/specials/SpecialMyLanguage.php @@ -80,6 +80,11 @@ class SpecialMyLanguage extends RedirectSpecialArticle { return null; } + if ( $base->isRedirect() ) { + $page = new WikiPage( $base ); + $base = $page->getRedirectTarget(); + } + $uiCode = $this->getLanguage()->getCode(); $proposed = $base->getSubpage( $uiCode ); if ( $uiCode !== $this->getConfig()->get( 'LanguageCode' ) && $proposed && $proposed->exists() ) { |