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