From: Ilmari Karonen Date: Sun, 14 Sep 2008 04:28:16 +0000 (+0000) Subject: Make sure no outgoing links are listed for nonexistent pages. Used to look for links... X-Git-Tag: 1.31.0-rc.0~45316 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=ad254e9ddc47ad2faaeac50aee754eca67d5feec;p=lhc%2Fweb%2Fwiklou.git 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. --- 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' );