Avoid "CAS updated failed" errors on Special:Preferences double post
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 13 Dec 2015 04:35:22 +0000 (20:35 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 15 Dec 2015 02:50:16 +0000 (02:50 +0000)
commitb046b93d93439c425454d49ffa086686422d665b
tree0235c778f59c5b51ccb39c38e3296479872aa69b
parent3b651b26b14ecb57d8f77cf9427e11c7f31fc0b0
Avoid "CAS updated failed" errors on Special:Preferences double post

* This does the same thing ApiOptions does to avoid these errors.
  A new getInstanceForUpdate() method is now in the User class to
  simplify this pattern.
* Avoid overriding $user in ApiOptions for code readability.
* Fixed IDEA errors around Preferences::getFormObject() return type.

Bug: T95839
Change-Id: If2385b7486c043bd70d7031ff35e37dfb079a4d2
includes/Preferences.php
includes/api/ApiOptions.php
includes/specials/SpecialPreferences.php
includes/user/User.php
tests/phpunit/includes/api/ApiOptionsTest.php