Append redirect=no to RecentChanges/Watchlist redirect entries
authorwithoutaname <drevitchi@gmail.com>
Sat, 26 Apr 2014 00:50:18 +0000 (17:50 -0700)
committerwithoutaname <drevitchi@gmail.com>
Tue, 29 Apr 2014 01:11:13 +0000 (18:11 -0700)
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

RELEASE-NOTES-1.24
includes/Feed.php
includes/changes/ChangesList.php
includes/specials/SpecialRecentchanges.php

index 48ea3d4..42eadaa 100644 (file)
@@ -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 ===
 
index 1b99519..7089c92 100644 (file)
@@ -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
         */
index 69e1e9e..246f95d 100644 (file)
@@ -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(),
index f1a31a5..f770307 100644 (file)
@@ -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