mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-14 11:16:16 +00:00
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:
parent
40ea204cdc
commit
93b1011ac9
|
@ -19,6 +19,7 @@ class EchoEditFormatter extends EchoBasicFormatter {
|
||||||
$message->params( '' );
|
$message->params( '' );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$diff = $event->getExtraParam( 'diffid', 'prev' );
|
||||||
$props = array(
|
$props = array(
|
||||||
'attribs' => array( 'class' => 'mw-echo-diff' ),
|
'attribs' => array( 'class' => 'mw-echo-diff' ),
|
||||||
'linkText' => $this->getMessage( 'parentheses' )
|
'linkText' => $this->getMessage( 'parentheses' )
|
||||||
|
@ -27,7 +28,7 @@ class EchoEditFormatter extends EchoBasicFormatter {
|
||||||
)->escaped(),
|
)->escaped(),
|
||||||
'param' => array(
|
'param' => array(
|
||||||
'oldid' => $revid,
|
'oldid' => $revid,
|
||||||
'diff' => 'prev',
|
'diff' => $diff,
|
||||||
),
|
),
|
||||||
// Set fragment to empty string for diff links
|
// Set fragment to empty string for diff links
|
||||||
'fragment' => ''
|
'fragment' => ''
|
||||||
|
|
Loading…
Reference in a new issue