mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-15 10:59:42 +00:00
Merge "Follow-up 6bb7939a79
: use GenderCache"
This commit is contained in:
commit
211ac6849e
|
@ -101,6 +101,7 @@ class ThanksHooks {
|
|||
);
|
||||
}
|
||||
|
||||
$genderCache = MediaWikiServices::getInstance()->getGenderCache();
|
||||
// Add 'thank' link
|
||||
$tooltip = wfMessage( 'thanks-thank-tooltip' )
|
||||
->params( $wgUser->getName(), $recipient->getName() )
|
||||
|
@ -113,7 +114,7 @@ class ThanksHooks {
|
|||
'href' => SpecialPage::getTitleFor( 'Thanks', $rev->getId() )->getFullURL(),
|
||||
'title' => $tooltip,
|
||||
'data-revision-id' => $rev->getId(),
|
||||
'data-recipient-gender' => $recipient->getOption( 'gender' ) ?: 'unknown',
|
||||
'data-recipient-gender' => $genderCache->getGenderOf( $recipient->getName(), __METHOD__ ),
|
||||
],
|
||||
wfMessage( 'thanks-thank', $wgUser, $recipient->getName() )->text()
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue