Title diff links should not include any fragment

Change-Id: I54d602ad910035033c3ff2741616fd0405c6e290
This commit is contained in:
bsitu 2013-07-02 14:20:01 -07:00
parent 727cdf34b1
commit 1ebc4b53de
2 changed files with 7 additions and 1 deletions

View file

@ -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',

View file

@ -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' ) {