Merge "Follow-up 6bb7939a79: use GenderCache"

This commit is contained in:
jenkins-bot 2018-01-25 04:36:34 +00:00 committed by Gerrit Code Review
commit 211ac6849e

View file

@ -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()
);