Introducing special page modular extensions, making the board vote special page the...
[lhc/web/wiklou.git] / includes / SpecialDeadendpages.php
1 <?php
2
3 require_once( "QueryPage.php" );
4
5 class DeadendPagesPage extends PageQueryPage {
6
7 function getName( ) {
8 return "Deadendpages";
9 }
10
11 # LEFT JOIN is expensive
12
13 function isExpensive( ) {
14 return 1;
15 }
16
17 function getSQL( $offset, $limit ) {
18 return "SELECT cur_title " .
19 "FROM cur LEFT JOIN links ON cur_id = l_from " .
20 "WHERE l_from IS NULL " .
21 "AND cur_namespace = 0 " .
22 "AND cur_is_redirect = 0 " .
23 "ORDER BY cur_title " .
24 "LIMIT {$offset}, {$limit}";
25 }
26 }
27
28 function wfSpecialDeadendpages() {
29
30 list( $limit, $offset ) = wfCheckLimits();
31
32 $depp = new DeadendPagesPage();
33
34 return $depp->doQuery( $offset, $limit );
35 }
36
37 ?>