Some documentation. Let's talk about it in wikitech-l.
[mediawiki.git] / includes / SpecialLonelypages.php
blobb1b2b200a4479b64b12751d69b52b87cd1f1b3c3
1 <?php
2 /**
4 */
6 /**
8 */
9 require_once( "QueryPage.php" );
11 /**
14 class LonelyPagesPage extends PageQueryPage {
16 function getName() {
17 return "Lonelypages";
20 function sortDescending() {
21 return false;
24 function isExpensive() {
25 return true;
28 function getSQL() {
29 $dbr =& wfGetDB( DB_SLAVE );
30 extract( $dbr->tableNames( 'cur', 'links' ) );
32 return "SELECT 'Lonelypages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " .
33 "FROM $cur LEFT JOIN $links ON cur_id=l_to ".
34 "WHERE l_to IS NULL AND cur_namespace=0 AND cur_is_redirect=0";
38 /**
39 * Constructor
41 function wfSpecialLonelypages() {
42 list( $limit, $offset ) = wfCheckLimits();
44 $lpp = new LonelyPagesPage();
46 return $lpp->doQuery( $offset, $limit );