fix notices related with an incorrect sql query
[mediawiki.git] / includes / SpecialDeadendpages.php
blob9e730b170d7fd3a78d0a143e1fd3d7c4297e9f66
1 <?php
3 require_once( "QueryPage.php" );
5 class DeadendPagesPage extends PageQueryPage {
7 function getName( ) {
8 return "Deadendpages";
11 # LEFT JOIN is expensive
13 function isExpensive( ) {
14 return 1;
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";
26 function wfSpecialDeadendpages() {
28 list( $limit, $offset ) = wfCheckLimits();
30 $depp = new DeadendPagesPage();
32 return $depp->doQuery( $offset, $limit );