Show changes to pages linked to via a redirect on Special:Recentchangeslinked
authorThomas Dalton <tango@users.mediawiki.org>
Thu, 18 Oct 2007 19:19:37 +0000 (19:19 +0000)
committerThomas Dalton <tango@users.mediawiki.org>
Thu, 18 Oct 2007 19:19:37 +0000 (19:19 +0000)
RELEASE-NOTES
includes/SpecialRecentchangeslinked.php

index d6bed90..063d7ab 100644 (file)
@@ -39,6 +39,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   against the previous revision, whether currently deleted or live.
 * Added tooltips for the "Go" and "Search" buttons
 * (bug 11649) Show input form when Special:Whatlinkshere has no parameters
+* Show changes to pages linked to via a redirect on Special:Recentchangeslinked
 
 === Bug fixes in 1.12 ===
 
index 2a8ac32..f1536e6 100644 (file)
@@ -60,8 +60,8 @@ function wfSpecialRecentchangeslinked( $par = NULL ) {
                $cmq = 'AND rc_minor=0';
        } else { $cmq = ''; }
 
-       list($recentchanges, $categorylinks, $pagelinks, $watchlist) = 
-           $dbr->tableNamesN( 'recentchanges', 'categorylinks', 'pagelinks', "watchlist" );
+       list($recentchanges, $categorylinks, $pagelinks, $watchlist, $redirect, $page) = 
+           $dbr->tableNamesN( 'recentchanges', 'categorylinks', 'pagelinks', "watchlist", "redirect", "page" );
 
        $uid = $wgUser->getID();
 
@@ -126,13 +126,19 @@ $GROUPBY
                        rc_new_len,
                        rc_deleted
 " . ($uid ? ",wl_user" : "") . "
-   FROM $pagelinks, $recentchanges
+   FROM $pagelinks, $recentchanges, $redirect, $page
 " . ($uid ? " LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") . "
    WHERE rc_timestamp > '{$cutoff}'
        {$cmq}
-     AND pl_namespace=rc_namespace
+     AND (pl_namespace=rc_namespace
      AND pl_title=rc_title
-     AND pl_from=$id
+     AND pl_from=$id)
+     OR (rd_namespace=rc_namespace
+     AND rd_title=rc_title
+     AND rd_from=page_id
+     AND page_namespace=pl_namespace
+     AND page_title=pl_title
+     AND pl_from=$id)
 $GROUPBY
 ";
        }