Links to redirects should have ?redirect=no

Bug: T351575
Change-Id: I8bced40d8f86010ec74ebc5ea81211bd7aaf3803
This commit is contained in:
Novem Linguae 2023-12-22 02:15:15 -08:00
parent fe2384d40e
commit 2f16b24b08

View file

@ -317,6 +317,8 @@ class SpecialNuke extends SpecialPage {
[],
[ 'action' => 'history' ]
);
$isRedirect = $title->isRedirect();
$query = $isRedirect ? [ 'redirect' => 'no' ] : [];
$out->addHTML( '<li>' .
Xml::check(
'pages[]',
@ -324,7 +326,7 @@ class SpecialNuke extends SpecialPage {
[ 'value' => $title->getPrefixedDBkey() ]
) . "\u{00A0}" .
( $thumb ? $thumb->toHtml( [ 'desc-link' => true ] ) : '' ) .
$linkRenderer->makeKnownLink( $title ) . $wordSeparator .
$linkRenderer->makeKnownLink( $title, null, [], $query ) . $wordSeparator .
$this->msg( 'parentheses' )->rawParams( $userNameText . $changesLink )->escaped() .
"</li>\n" );
}