I was adding a special page (dead-end pages), and I realized that almost all
[lhc/web/wiklou.git] / includes / SpecialLonelypages.php
1 <?
2
3 include_once( "QueryPage.php" );
4
5 class LonelyPagesPage extends PageQueryPage {
6
7 function getName() {
8 return "Lonelypages";
9 }
10
11 function isExpensive() {
12 return 1;
13 }
14
15 function getSQL( $offset, $limit ) {
16
17 return "SELECT cur_title FROM cur LEFT JOIN links ON " .
18 "cur_id=l_to WHERE l_to IS NULL AND cur_namespace=0 AND " .
19 "cur_is_redirect=0 ORDER BY cur_title LIMIT {$offset}, {$limit}";
20 }
21 }
22
23 function wfSpecialLonelypages()
24 {
25 list( $limit, $offset ) = wfCheckLimits();
26
27 $lpp = new LonelyPagesPage();
28
29 return $lpp->doQuery( $offset, $limit );
30 }
31
32 ?>