From b1091488ea13bc1608c76934129426ca427f98ff Mon Sep 17 00:00:00 2001 From: Thomas Dalton Date: Thu, 18 Oct 2007 19:19:37 +0000 Subject: [PATCH] Show changes to pages linked to via a redirect on Special:Recentchangeslinked --- RELEASE-NOTES | 1 + includes/SpecialRecentchangeslinked.php | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d6bed90341..063d7ab3d4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php index 2a8ac32d1a..f1536e6a70 100644 --- a/includes/SpecialRecentchangeslinked.php +++ b/includes/SpecialRecentchangeslinked.php @@ -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 "; } -- 2.20.1