Use User::getDefaultOption() instead of $wgDefaultUserOptions
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 16 Jun 2012 08:16:28 +0000 (10:16 +0200)
committerAaron Schulz <aschulz@wikimedia.org>
Sat, 21 Jul 2012 10:00:04 +0000 (03:00 -0700)
commita36ddc96610bfdfbf7be4f2ac811a348f9c6216e
tree6fcf001fd56fd5d1a3cf3c7296d264325acba704
parent56cba166bd43477ff787d3a055abeb3d993daebd
Use User::getDefaultOption() instead of $wgDefaultUserOptions

Using User::getDefaultOption() in User::setOption() sets preferences like
'language' to the right default value, whereas using $wgDefaultOptions
sets the language to null because language is not part of $wgDefaultUserOptions,
but it is part of return value of User::getDefaultOption().

This only makes problems when reusing the same user object, because when
a new user object is created, the value of 'language' is correct.

Change-Id: I43a32c66fc3997a4f842c63af374e84d234602b2
includes/User.php