Allow custom 'diff' values to be set

So we can link to multiple edits at once. This should not
change any existing behavior since 'prev' is used if nothing
is set.

Change-Id: If79e041d1443d8360abdf60b513ce8c7c0c7e1f8
This commit is contained in:
Kunal Mehta 2013-11-19 18:44:01 +00:00 committed by [[mw:User:Legoktm]]
parent 40ea204cdc
commit 93b1011ac9

View file

@ -19,6 +19,7 @@ class EchoEditFormatter extends EchoBasicFormatter {
$message->params( '' );
return;
}
$diff = $event->getExtraParam( 'diffid', 'prev' );
$props = array(
'attribs' => array( 'class' => 'mw-echo-diff' ),
'linkText' => $this->getMessage( 'parentheses' )
@ -27,7 +28,7 @@ class EchoEditFormatter extends EchoBasicFormatter {
)->escaped(),
'param' => array(
'oldid' => $revid,
'diff' => 'prev',
'diff' => $diff,
),
// Set fragment to empty string for diff links
'fragment' => ''