SpecialMyLanguage: Use page language instead of wiki language for redirect target...
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Fri, 18 Dec 2015 02:26:23 +0000 (03:26 +0100)
committerNikerabbit <niklas.laxstrom@gmail.com>
Tue, 23 Aug 2016 12:57:37 +0000 (12:57 +0000)
commit29cac40c821856b0eb6c47d2f396b599347653c3
tree0fd09e8047d4edcac9776f9491aa582b10d8777b
parent7837db4994f24dad920c8126dc38d8ca051288fe
SpecialMyLanguage: Use page language instead of wiki language for redirect target check

With the change, named in Follow up, it's possible for site owners to
allow to change the language of a page using a special page.
Theoretically, any page can have another or a different page language,
depending on, if the language was changed using the special page or not.
For Special:MyLanguage it isn't enough anymore to check, if the current
user language is the same as the default content language. It has to
check, if the page language (which can potentionally differ from the
default content language) is the same as the user language.

The problem:
If content language is the same as the user language, Special:MyLanguage
currently redirects to the "base page" of a page ("Testpage" instead of
"Testpage/de"), no matter, if the page language of the base part is
another one as the default content language. This can result in the
problem, that Special:MyLanguage redirects to a page, that has a
different language as the user language, even if a subpage with the user
language code exists. This is fixed with this change.

Follow up: I0f82b146fbe948f917c1

Bug: T121834
Change-Id: Ic9fc9049813c153111829d37a2c248dc0768e0fb
includes/specials/SpecialMyLanguage.php