blob: fdd850868f987d6e4ca87e0a7cb3a86641084fec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
<?php
/**
*
*/
/**
*
*/
require_once( "QueryPage.php" );
/**
*
*/
class DeadendPagesPage extends PageQueryPage {
function getName( ) {
return "Deadendpages";
}
/**
* LEFT JOIN is expensive
*
* @return true
*/
function isExpensive( ) {
return 1;
}
/**
* @return false
*/
function sortDescending() {
return false;
}
/**
* @return string an sqlquery
*/
function getSQL() {
$dbr =& wfGetDB( DB_SLAVE );
extract( $dbr->tableNames( 'cur', 'links' ) );
return "SELECT 'Deadendpages' as type, cur_namespace AS namespace, cur_title as title, cur_title AS value " .
"FROM $cur LEFT JOIN $links ON cur_id = l_from " .
"WHERE l_from IS NULL " .
"AND cur_namespace = 0 " .
"AND cur_is_redirect = 0";
}
}
/**
* Constructor
*/
function wfSpecialDeadendpages() {
list( $limit, $offset ) = wfCheckLimits();
$depp = new DeadendPagesPage();
return $depp->doQuery( $offset, $limit );
}
?>
|