From: umherirrender Date: Sat, 24 Aug 2013 18:27:39 +0000 (+0200) Subject: Use redirect=no for links to file redirects in "file usages" section X-Git-Tag: 1.31.0-rc.0~18790^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=ed5098617439f56ef94373726ad3b3813b951c7e;p=lhc%2Fweb%2Fwiklou.git Use redirect=no for links to file redirects in "file usages" section Bug: 50051 Change-Id: Ie77af42b2d9183ba2f56a300a6604c3f71ee89b8 --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 5fa44d529b..7ea06b0e85 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -765,7 +765,15 @@ EOT break; } - $link = Linker::linkKnown( Title::makeTitle( $element->page_namespace, $element->page_title ) ); + $query = array(); + # Add a redirect=no to make redirect pages reachable + if ( isset( $redirects[$element->page_title] ) ) { + $query['redirect'] = 'no'; + } + $link = Linker::linkKnown( + Title::makeTitle( $element->page_namespace, $element->page_title ), + null, array(), $query + ); if ( !isset( $redirects[$element->page_title] ) ) { # No redirects $liContents = $link;