5 * @subpackage SpecialPage
11 require_once( "QueryPage.php" );
16 * @subpackage SpecialPage
18 class LonelyPagesPage
extends PageQueryPage
{
24 function sortDescending() {
28 function isExpensive() {
33 $dbr =& wfGetDB( DB_SLAVE
);
34 extract( $dbr->tableNames( 'cur', 'links' ) );
36 return "SELECT 'Lonelypages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " .
37 "FROM $cur LEFT JOIN $links ON cur_id=l_to ".
38 "WHERE l_to IS NULL AND cur_namespace=0 AND cur_is_redirect=0";
45 function wfSpecialLonelypages() {
46 list( $limit, $offset ) = wfCheckLimits();
48 $lpp = new LonelyPagesPage();
50 return $lpp->doQuery( $offset, $limit );