mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 07:54:13 +00:00
Title diff links should not include any fragment
Change-Id: I54d602ad910035033c3ff2741616fd0405c6e290
This commit is contained in:
parent
727cdf34b1
commit
1ebc4b53de
|
@ -616,6 +616,10 @@ class EchoBasicFormatter extends EchoNotificationFormatter {
|
|||
$eventData = $event->getExtra();
|
||||
if ( isset( $eventData['revid'] ) && $event->getTitle() ) {
|
||||
$target = $event->getTitle();
|
||||
// Explicitly set fragment to empty string for diff links, $title is
|
||||
// passed around by reference, it may end up using fragment set from
|
||||
// other parameters
|
||||
$target->setFragment( '#' );
|
||||
$query = array(
|
||||
'oldid' => $eventData['revid'],
|
||||
'diff' => 'prev',
|
||||
|
|
|
@ -23,7 +23,9 @@ class EchoEditFormatter extends EchoBasicFormatter {
|
|||
'param' => array(
|
||||
'oldid' => $revid,
|
||||
'diff' => 'prev',
|
||||
)
|
||||
),
|
||||
// Set fragment to empty string for diff links
|
||||
'fragment' => ''
|
||||
);
|
||||
$this->setTitleLink( $event, $message, $props );
|
||||
} elseif ( $param === 'summary' ) {
|
||||
|
|
Loading…
Reference in a new issue