mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-16 08:24:47 +00:00
f8d82481a8
Suppress the issue with a hint to the task (T201565) allows to enable the voting jobs and avoids new issues in the future. Change-Id: I88d09923d1e1a59e285513e56985989fabbb4505
25 lines
800 B
PHP
25 lines
800 B
PHP
<?php
|
|
/**
|
|
* This class formats log entries for thanks
|
|
*/
|
|
class ThanksLogFormatter extends LogFormatter {
|
|
/**
|
|
* @inheritDoc
|
|
* @suppress SecurityCheck-DoubleEscaped Problem with makeUserLink, see T201565
|
|
*/
|
|
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 [ Title::makeTitle( NS_USER_TALK, $this->entry->getTarget()->getText() ) ];
|
|
}
|
|
}
|