2013-03-18 19:56:12 +00:00
|
|
|
<?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,
|
2016-04-22 20:13:56 +00:00
|
|
|
[
|
2013-03-18 19:56:12 +00:00
|
|
|
'class' => 'mw-echo-diff',
|
|
|
|
'linkText' => wfMessage( 'notification-thanks-diff-link' )->text(),
|
2016-04-22 20:13:56 +00:00
|
|
|
'param' => [
|
2013-03-18 19:56:12 +00:00
|
|
|
'oldid' => $eventData['revid'],
|
|
|
|
'diff' => 'prev',
|
2016-04-22 20:13:56 +00:00
|
|
|
]
|
|
|
|
]
|
2013-03-18 19:56:12 +00:00
|
|
|
);
|
2013-11-02 13:36:44 +00:00
|
|
|
|
2013-03-18 19:56:12 +00:00
|
|
|
} else {
|
|
|
|
parent::processParam( $event, $param, $message, $user );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|