Commit graph

7 commits

Author SHA1 Message Date
thiemowmde 7845b5fab1 Fix mistake in gender support for user group changes
This was a mistake in I53c0283, sorry. There are two users involved:
The "agent" is the user (typically an administrator) that made the
user group change, while the "viewing user" is the user for which the
user group was changed. When the "agent" moves the "viewing user"
into a new user group, the "viewing user" is the one that's now
a member of that group. They are what dictates the gender for the
"group-…-member" message.

Is this mistake bad enough for a backport?

Bug: T368249
Change-Id: I4916de2fb171873b625e51ee8823811e0296d323
2024-07-05 20:18:56 +02:00
thiemowmde eaa1fea890 Fix incomplete gender support for user group changes
This affects primarily the message
"notification-header-user-rights-add-only" which is very priminently
seen by every new editor that made their first few edits and gets
promoted to the next user group a few days later. Turns out the code
was just incomplete. All the information about the user and their
gender is already there, it was just not forwarded correctly.

Notice there are two messages:
* "group-…" messages don't have gender support. This is the (ideally)
  gender neutral name of the group. Meant to be used as e.g. section
  heading for a list of users.
* "group-…-member" is the same with gender support. To be used in all
  contexts that are about a single, specific user with known gender.
  Which is exactly what's happening here.

Turns out we can even use a neat convenience function from the
Language class that does exactly what we need.

I can't tell why but the array_values is apparently critical.
Originally added via I49b5fe5. It can't hurt so I keep it.

Bug: T368249
Change-Id: I53c028375d77c93f399538fd38aa8f8af30934b0
2024-06-28 11:49:10 +02:00
Umherirrender a0ca1d89c6 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statements done manually

Change-Id: Iad87245bf8082193be72f7e482f29e9f1bad11fc
2023-12-11 16:39:00 +01:00
Reedy 1bc5b6daf8 Namespace classes that need aliases
Change-Id: Ieeeaf80d04b060d6dbca1959d5e66f4c69c5a7f2
2023-08-18 19:00:41 +01:00
gerritbot 68b06cac10 Update moved class RawMessage
See T321882. Moved in I195cf4c67bd514

Bug: T321681
Change-Id: I6ca53fd2b8f3523ea5e29a9119d96da51e0a55a5
2023-05-19 10:30:54 +00:00
Fomafix 096e4a709f Use short array destructuring instead of list()
Introduced in PHP 7.1. Because it's shorter and looks nice.

Change-Id: I395e791aed6cc99b7ce1273f51c292e29360443a
2022-11-08 16:41:24 +00:00
Reedy 7619a76877 Namespace Echo Formatters
Change-Id: I5bf398cdb76a577543f6526ac1bee4a73897103d
2022-11-01 21:20:06 -06:00
Renamed from includes/formatters/UserRightsPresentationModel.php (Browse further)