fix notices related with an incorrect sql query
[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_namespace AS namespace, cur_title as title, 0 as value " .
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 }
24 }
25
26 function wfSpecialDeadendpages() {
27
28 list( $limit, $offset ) = wfCheckLimits();
29
30 $depp = new DeadendPagesPage();
31
32 return $depp->doQuery( $offset, $limit );
33 }
34
35 ?>