(bug 12764) Special:LonelyPages shows transcluded pages
authorHuji <huji@users.mediawiki.org>
Fri, 24 Oct 2008 13:34:17 +0000 (13:34 +0000)
committerHuji <huji@users.mediawiki.org>
Fri, 24 Oct 2008 13:34:17 +0000 (13:34 +0000)
RELEASE-NOTES
includes/specials/SpecialLonelypages.php
languages/messages/MessagesEn.php

index 0e33791..1d850d6 100644 (file)
@@ -282,6 +282,7 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 5101) Image from Commons doesn't show up when searched in Wikipedia search box
 * (bug 14609) User's namespaces to be searched default not updated after adding new namespace
 * Purge form uses valid XHTML and (bug 8992) uses $wgRequest instead of $_SERVER
+* (bug 12764) Special:LonelyPages shows transcluded pages
 
 === API changes in 1.14 ===
 
index 5aafac7..90da25f 100644 (file)
@@ -29,7 +29,7 @@ class LonelyPagesPage extends PageQueryPage {
 
        function getSQL() {
                $dbr = wfGetDB( DB_SLAVE );
-               list( $page, $pagelinks ) = $dbr->tableNamesN( 'page', 'pagelinks' );
+               list( $page, $pagelinks, $templatelinks ) = $dbr->tableNamesN( 'page', 'pagelinks', 'templatelinks' );
 
                return
                  "SELECT 'Lonelypages'  AS type,
@@ -39,9 +39,12 @@ class LonelyPagesPage extends PageQueryPage {
                     FROM $page
                LEFT JOIN $pagelinks
                       ON page_namespace=pl_namespace AND page_title=pl_title
+               LEFT JOIN $templatelinks
+                               ON page_namespace=tl_namespace AND page_title=tl_title
                    WHERE pl_namespace IS NULL
                      AND page_namespace=".NS_MAIN."
-                     AND page_is_redirect=0";
+                     AND page_is_redirect=0
+                         AND tl_namespace IS NULL";
 
        }
 }
index 998c59a..39fb8c2 100644 (file)
@@ -2041,7 +2041,7 @@ Each row contains links to the first and second redirect, as well as the target
 'specialpage-empty'               => 'There are no results for this report.',
 'lonelypages'                     => 'Orphaned pages',
 'lonelypages-summary'             => '', # do not translate or duplicate this message to other languages
-'lonelypagestext'                 => 'The following pages are not linked from other pages in {{SITENAME}}.',
+'lonelypagestext'                 => 'The following pages are not linked from or transcluded into other pages in {{SITENAME}}.',
 'uncategorizedpages'              => 'Uncategorized pages',
 'uncategorizedpages-summary'      => '', # do not translate or duplicate this message to other languages
 'uncategorizedcategories'         => 'Uncategorized categories',