5 * @subpackage SpecialPage
11 * @subpackage SpecialPage
13 class DeadendPagesPage
extends PageQueryPage
{
16 return "Deadendpages";
20 * LEFT JOIN is expensive
24 function isExpensive( ) {
28 function isSyndicated() { return false; }
33 function sortDescending() {
38 * @return string an sqlquery
41 $dbr =& wfGetDB( DB_SLAVE
);
42 extract( $dbr->tableNames( 'page', 'pagelinks' ) );
43 return "SELECT 'Deadendpages' as type, page_namespace AS namespace, page_title as title, page_title AS value " .
44 "FROM $page LEFT JOIN $pagelinks ON page_id = pl_from " .
45 "WHERE pl_from IS NULL " .
46 "AND page_namespace = 0 " .
47 "AND page_is_redirect = 0";
54 function wfSpecialDeadendpages() {
56 list( $limit, $offset ) = wfCheckLimits();
58 $depp = new DeadendPagesPage();
60 return $depp->doQuery( $offset, $limit );