wfLimitResult() -> Database::limitResult()
[lhc/web/wiklou.git] / includes / SpecialLonelypages.php
1 <?php
2
3 require_once( "QueryPage.php" );
4
5 class LonelyPagesPage extends PageQueryPage {
6
7 function getName() {
8 return "Lonelypages";
9 }
10
11 function sortDescending() {
12 return false;
13 }
14
15 function isExpensive() {
16 return true;
17 }
18
19 function getSQL() {
20 $dbr =& wfGetDB( DB_SLAVE );
21 extract( $dbr->tableNames( 'cur', 'links' ) );
22
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";
26 }
27 }
28
29 function wfSpecialLonelypages() {
30 list( $limit, $offset ) = wfCheckLimits();
31
32 $lpp = new LonelyPagesPage();
33
34 return $lpp->doQuery( $offset, $limit );
35 }
36
37 ?>