mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-12-16 16:30:32 +00:00
03b8f88fff
Change-Id: I939d6f4d989cf21c0f817d262bf3e4acedcf2ffe
36 lines
736 B
PHP
36 lines
736 B
PHP
<?php
|
|
|
|
class EchoThanksFormatter extends EchoBasicFormatter {
|
|
|
|
/**
|
|
* @param $event EchoEvent
|
|
* @param $param
|
|
* @param $message Message
|
|
* @param $user User
|
|
*/
|
|
protected function processParam( $event, $param, $message, $user ) {
|
|
if ( $param === 'difflink' ) {
|
|
$eventData = $event->getExtra();
|
|
if ( !isset( $eventData['revid'] ) ) {
|
|
$message->params( '' );
|
|
return;
|
|
}
|
|
$this->setTitleLink(
|
|
$event,
|
|
$message,
|
|
[
|
|
'class' => 'mw-echo-diff',
|
|
'linkText' => wfMessage( 'notification-thanks-diff-link' )->text(),
|
|
'param' => [
|
|
'oldid' => $eventData['revid'],
|
|
'diff' => 'prev',
|
|
]
|
|
]
|
|
);
|
|
|
|
} else {
|
|
parent::processParam( $event, $param, $message, $user );
|
|
}
|
|
}
|
|
}
|