wiki.techinc.nl/includes/user
Daimona Eaytoy 090599c048 Simplify timezone-related code for user preferences
This patch simplifies and fixes a few issues in code related to the
'timecorrection' user setting:
- Always re-apply UserTimeCorrection normalization to the preference
  value, although it should be already normalized
- Avoid duplicating code from UserTimeCorrection, both for the
  pipe-splitting and the offset computation/fallback
- Use better variable names
- Inject an ITextFormatter for generating the dropdown options, instead
  of a ContextSource (ew) or a Language, removing calls to wfMessage as
  well. Note that the ITextFormatter is not injected into the
  preferences factory because the eventual goal is to move the code to a
  new HTMLFormField class.
- In TimezoneFilter, remove a redundant check: the value comes from the
  form, and the option for using the system time is always "System|XXX",
  never just "System". This seems to have been introduced in
  I2cadac00e46dff2bc7d81ac2f294ea2ae4e72f47; the previous code was only
  comparing $data[0], and not $tz. Change the test accordingly and add a
  test case.
- Add missing star to docblocks in UserTimeCorrection, as well as a
  missing int cast.
- Fix typo and other style issues in UserTimeCorrectionTest
- Bonus: add missing docblock star in HTMLApiField

Bug: T309629
Change-Id: Iab35eb17259826429e4b6bc1ba7385ab57884e98
2022-09-12 12:23:48 +00:00
..
CentralId Use User::isRegistered for readability instead of ::getId falsy check 2022-04-29 21:15:57 +02:00
Hook UserClearNewTalkNotificationHook: Add a \ before class name 2022-08-22 23:54:12 +01:00
Options/Hook
TempUser TempUser: ScrambleMapping 2022-05-16 17:36:22 +00:00
ActorCache.php
ActorNormalization.php Revert "Remove last User dependencies from File" 2021-11-26 17:06:36 +00:00
ActorStore.php Simplify assertion for false around wiki id and domain id 2022-06-18 09:49:13 +02:00
ActorStoreFactory.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
BotPassword.php Use MainConfigNames instead of string literals, #2 2022-04-13 18:55:46 +03:00
BotPasswordStore.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
DefaultOptionsLookup.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
ExternalUserNames.php Use UserRigorOptions directly 2022-03-25 10:06:34 +11:00
LoggedOutEditToken.php
PasswordReset.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
StaticUserOptionsLookup.php Fix many typos in comments 2022-05-10 12:46:11 +00:00
TalkPageNotificationManager.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
User.php Drop User methods which were deprecated since 1.38 2022-09-05 15:29:14 -04:00
UserArray.php user: Let UserArray::newFromResult return empty iterator 2022-03-20 18:57:53 +00:00
UserArrayFromResult.php Get rid of warnings on PHP 8.1 2022-06-13 04:42:20 -04:00
UserEditTracker.php Merge "Start clean up of revision_actor_temp table" 2022-05-23 16:54:28 +00:00
UserFactory.php TempUser infrastructure and services 2022-04-14 09:23:55 +10:00
UserGroupManager.php Improve docs of various ::getQueryInfo functions 2022-08-13 21:18:44 +02:00
UserGroupManagerFactory.php TempUser EditPage and permissions 2022-04-26 14:10:53 +10:00
UserGroupMembership.php
UserIdentity.php
UserIdentityLookup.php
UserIdentityValue.php Throw for mismatched wiki in UserIdentity::getId 2022-05-01 17:41:48 +03:00
UserNamePrefixSearch.php user: Remove support for UserIdentity audience from UserNamePrefixSearch 2022-03-25 01:11:39 +00:00
UserNamePrefixSearch_deprecated.php
UserNameUtils.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
UserOptionsLookup.php
UserOptionsManager.php Use MainConfigNames instead of string literals, #4 2022-04-26 19:03:37 +03:00
UserRightsProxy.php Use MainConfigNames instead of string literals, #2 2022-04-13 18:55:46 +03:00
UserRigorOptions.php TempUser infrastructure and services 2022-04-14 09:23:55 +10:00
UserSelectQueryBuilder.php Pass array to Assert::parameterType when asserting multiple types 2022-06-18 09:34:36 +02:00
UserTimeCorrection.php Simplify timezone-related code for user preferences 2022-09-12 12:23:48 +00:00