HomePhabricator

Do not use setlang to change user language

Authored by Fomafix.

Description

Do not use setlang to change user language

Requests using GET should only retrieve data and should have no other effect.
(https://en.wikipedia.org/wiki/HTTP_GET_request)

  • Use API with POST to change the user interface language in user settings.
  • When allowed by wgULSAnonCanChangeLanguage set cookie for anonymous user or when API fails.

This change uses mediawiki.cookie which requires MediaWiki 1.24+.

Bug: T46649
Change-Id: Iaf6fafbf200933dfc760be69d2adf5e5efcf8245

Event Timeline

[[mw:User:Fomafix]] <gerritpatchuploader@gmail.com> committed rEULS0d5c69f65587: Do not use setlang to change user language (authored by Fomafix).Sep 8 2015, 8:21 PM