8 * A special page looking for articles with no article linking to them,
10 * @ingroup SpecialPage
12 class LonelyPagesPage
extends PageQueryPage
{
17 function getPageHeader() {
18 return wfMsgExt( 'lonelypagestext', array( 'parse' ) );
21 function sortDescending() {
25 function isExpensive() {
28 function isSyndicated() { return false; }
31 $dbr = wfGetDB( DB_SLAVE
);
32 list( $page, $pagelinks, $templatelinks ) = $dbr->tableNamesN( 'page', 'pagelinks', 'templatelinks' );
35 "SELECT 'Lonelypages' AS type,
36 page_namespace AS namespace,
41 ON page_namespace=pl_namespace AND page_title=pl_title
42 LEFT JOIN $templatelinks
43 ON page_namespace=tl_namespace AND page_title=tl_title
44 WHERE pl_namespace IS NULL
45 AND page_namespace=".NS_MAIN
."
46 AND page_is_redirect=0
47 AND tl_namespace IS NULL";
55 function wfSpecialLonelypages() {
56 list( $limit, $offset ) = wfCheckLimits();
58 $lpp = new LonelyPagesPage();
60 return $lpp->doQuery( $offset, $limit );