mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-23 19:53:05 +00:00
d4661cd379
* thanks-thank-tooltip * logentry-thanks-thank Change-Id: Ib5e17695dda7db5b07db51bb20579d23f88666e5
21 lines
699 B
PHP
21 lines
699 B
PHP
<?php
|
|
/**
|
|
* This class formats log entries for thanks
|
|
*/
|
|
class ThanksLogFormatter extends LogFormatter {
|
|
protected function getMessageParameters() {
|
|
$params = parent::getMessageParameters();
|
|
// Convert target from a pageLink to a userLink since the target is
|
|
// actually a user, not a page.
|
|
$recipient = User::newFromName( $this->entry->getTarget()->getText(), false );
|
|
$params[2] = Message::rawParam( $this->makeUserLink( $recipient ) );
|
|
$params[3] = $recipient->getName();
|
|
return $params;
|
|
}
|
|
|
|
public function getPreloadTitles() {
|
|
// Add the recipient's user talk page to LinkBatch
|
|
return array( Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) );
|
|
}
|
|
}
|