mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Thanks
synced 2024-11-27 16:20:12 +00:00
bc369fdf85
See https://www.mediawiki.org/wiki/Extension:Thanks Change-Id: Ic037f1fcde0f7fa10848c2ed8e31291ad022027d
35 lines
745 B
PHP
35 lines
745 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,
|
|
array(
|
|
'class' => 'mw-echo-diff',
|
|
'linkText' => wfMessage( 'notification-thanks-diff-link' )->text(),
|
|
'param' => array(
|
|
'oldid' => $eventData['revid'],
|
|
'diff' => 'prev',
|
|
)
|
|
)
|
|
);
|
|
} else {
|
|
parent::processParam( $event, $param, $message, $user );
|
|
}
|
|
}
|
|
}
|