From ad254e9ddc47ad2faaeac50aee754eca67d5feec Mon Sep 17 00:00:00 2001 From: Ilmari Karonen Date: Sun, 14 Sep 2008 04:28:16 +0000 Subject: [PATCH] Make sure no outgoing links are listed for nonexistent pages. Used to look for links from article 0, which could produce confusing results if the database contained any (broken) records that actually matched such a query. --- RELEASE-NOTES | 2 ++ includes/specials/SpecialRecentchangeslinked.php | 3 +++ 2 files changed, 5 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a020edc958..dababff8ca 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -199,6 +199,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12284) Special:Preferences now sets a returnto parameter on the link to Special:Userlogin. Patch by Marooned. * Fixed the HTTP accept language string detection length in LanguageConverter.php, instead of the fixed length language codes. +* Special:Recentchangeslinked no longer shows outgoing links for nonexistent pages + even if there are broken link records with source article id 0 in the database === API changes in 1.14 === diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 2adc010795..361b7dff18 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -96,6 +96,9 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges { if( $ns == NS_IMAGE || !$showlinkedto ) $link_tables[] = 'imagelinks'; } + if( $id == 0 && !$showlinkedto ) + return false; // nonexistent pages can't link to any pages + // field name prefixes for all the various tables we might want to join with $prefix = array( 'pagelinks' => 'pl', 'templatelinks' => 'tl', 'categorylinks' => 'cl', 'imagelinks' => 'il' ); -- 2.20.1