From: withoutaname Date: Sat, 26 Apr 2014 00:50:18 +0000 (-0700) Subject: Append redirect=no to RecentChanges/Watchlist redirect entries X-Git-Tag: 1.31.0-rc.0~15948^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=866f478dc93eb70d2b381ecf3a9614ae66105a97;p=lhc%2Fweb%2Fwiklou.git Append redirect=no to RecentChanges/Watchlist redirect entries This change adds redirect=no in the URL of redirect entries in the RecentChanges or in the Watchlist. Entries which are not redirects will not be affected. Some typos in documentation were also fixed. Bug: 890 Change-Id: I79593811d92b2f57abd742c8ba9e66769d8bc9b7 --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 48ea3d425d..42eadaa82f 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -18,6 +18,8 @@ production. option and a size specification set will now always ignore the provided size and display an unscaled image, as the documentation has always claimed it would. +* (bug 890) Links in Special:RecentChanges and Special:Watchlist no longer + follow redirects to their target pages. === Web API changes in 1.24 === diff --git a/includes/Feed.php b/includes/Feed.php index 1b995195cb..7089c925bd 100644 --- a/includes/Feed.php +++ b/includes/Feed.php @@ -93,7 +93,7 @@ class FeedItem { } /** - * set the unique id of an item + * Set the unique id of an item * * @param string $uniqueId Unique id for the item * @param bool $rssIsPermalink Set to true if the guid (unique id) is a permalink (RSS feeds only) @@ -141,7 +141,7 @@ class FeedItem { } /** - * Get the title of this item + * Get the date of this item * * @return string */ diff --git a/includes/changes/ChangesList.php b/includes/changes/ChangesList.php index 69e1e9ea5d..246f95d211 100644 --- a/includes/changes/ChangesList.php +++ b/includes/changes/ChangesList.php @@ -344,6 +344,9 @@ class ChangesList extends ContextSource { */ public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) { $params = array(); + if ( $rc->getTitle()->isRedirect() ) { + $params = array( 'redirect' => 'no' ); + } $articlelink = Linker::linkKnown( $rc->getTitle(), diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index f1a31a5925..f770307801 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -527,7 +527,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage { } /** - * Create a input to filter changes by categories + * Create an input to filter changes by categories * * @param FormOptions $opts * @return array