5 * @subpackage SpecialPage
11 require_once( "QueryPage.php" );
16 * @subpackage SpecialPage
18 class DeadendPagesPage
extends PageQueryPage
{
21 return "Deadendpages";
25 * LEFT JOIN is expensive
29 function isExpensive( ) {
33 function isSyndicated() { return false; }
38 function sortDescending() {
43 * @return string an sqlquery
46 $dbr =& wfGetDB( DB_SLAVE
);
47 extract( $dbr->tableNames( 'page', 'pagelinks' ) );
48 return "SELECT 'Deadendpages' as type, page_namespace AS namespace, page_title as title, page_title AS value " .
49 "FROM $page LEFT JOIN $pagelinks ON page_id = pl_from " .
50 "WHERE pl_from IS NULL " .
51 "AND page_namespace = 0 " .
52 "AND page_is_redirect = 0";
59 function wfSpecialDeadendpages() {
61 list( $limit, $offset ) = wfCheckLimits();
63 $depp = new DeadendPagesPage();
65 return $depp->doQuery( $offset, $limit );