API: Avoid unstubbing User for language pref when not needed
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 5 Jan 2015 16:59:48 +0000 (11:59 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 5 Jan 2015 16:59:48 +0000 (11:59 -0500)
commit87070fc6743bfe5da7b49f07561fc1e0b03897c4
tree2a3a84abf6bc1310897001a58b11dd5daaf30786
parent29ca277c381cae8f792c24e9adff3c2dac932d80
API: Avoid unstubbing User for language pref when not needed

It's fairly common that the API doesn't need to load the user
preferences, except to implement the unfortunate default uselang=user.

So let's move the handling of uselang=user to
RequestContext::getLanguage(), and have the API just assume that its
parent context will eventually fall back to that for uselang=user.

Bug: T85635
Change-Id: I947348d87b31808d331055dac6feb0cc2e1dd15d
includes/api/ApiMain.php
includes/context/RequestContext.php