3 require_once( "QueryPage.php" );
5 class LonelyPagesPage
extends PageQueryPage
{
11 function isExpensive() {
16 $dbr =& wfGetDB( DB_SLAVE
);
17 extract( $dbr->tableNames( 'cur', 'links' ) );
19 return "SELECT 'Lonelypages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " .
20 "FROM $cur LEFT JOIN $links ON cur_id=l_to ".
21 "WHERE l_to IS NULL AND cur_namespace=0 AND cur_is_redirect=0";
25 function wfSpecialLonelypages() {
26 list( $limit, $offset ) = wfCheckLimits();
28 $lpp = new LonelyPagesPage();
30 return $lpp->doQuery( $offset, $limit );