Make sure no outgoing links are listed for nonexistent pages. Used to look for links...
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchangeslinked.php
index 2adc010..361b7df 100644 (file)
@@ -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' );