Split link generation, table of contents, and image functions from the
[mediawiki.git] / includes / SpecialLonelypages.php
blobd8d97d81f7afe4a5d114b8d6c6d6b4a25ddfe5fd
1 <?php
2 /**
4 * @package MediaWiki
5 * @subpackage SpecialPage
6 */
8 /**
11 require_once( "QueryPage.php" );
13 /**
15 * @package MediaWiki
16 * @subpackage SpecialPage
18 class LonelyPagesPage extends PageQueryPage {
20 function getName() {
21 return "Lonelypages";
24 function sortDescending() {
25 return false;
28 function isExpensive() {
29 return true;
31 function isSyndicated() { return false; }
33 function getSQL() {
34 $dbr =& wfGetDB( DB_SLAVE );
35 extract( $dbr->tableNames( 'cur', 'links' ) );
37 return "SELECT 'Lonelypages' as type, cur_namespace AS namespace, cur_title AS title, cur_title AS value " .
38 "FROM $cur LEFT JOIN $links ON cur_id=l_to ".
39 "WHERE l_to IS NULL AND cur_namespace=0 AND cur_is_redirect=0";
43 /**
44 * Constructor
46 function wfSpecialLonelypages() {
47 list( $limit, $offset ) = wfCheckLimits();
49 $lpp = new LonelyPagesPage();
51 return $lpp->doQuery( $offset, $limit );