4 * @addtogroup SpecialPage
9 * @addtogroup SpecialPage
11 class DeadendPagesPage
extends PageQueryPage
{
14 return "Deadendpages";
17 function getPageHeader() {
18 return '<p>' . wfMsg('deadendpagestext') . '</p>';
22 * LEFT JOIN is expensive
26 function isExpensive( ) {
30 function isSyndicated() { return false; }
35 function sortDescending() {
40 * @return string an sqlquery
43 $dbr = wfGetDB( DB_SLAVE
);
44 list( $page, $pagelinks ) = $dbr->tableNamesN( 'page', 'pagelinks' );
45 return "SELECT 'Deadendpages' as type, page_namespace AS namespace, page_title as title, page_title AS value " .
46 "FROM $page LEFT JOIN $pagelinks ON page_id = pl_from " .
47 "WHERE pl_from IS NULL " .
48 "AND page_namespace = 0 " .
49 "AND page_is_redirect = 0";
56 function wfSpecialDeadendpages() {
58 list( $limit, $offset ) = wfCheckLimits();
60 $depp = new DeadendPagesPage();
62 return $depp->doQuery( $offset, $limit );