MediaWiki REL1_31
SpecialDeadendpages.php
Go to the documentation of this file.
1<?php
30
31 function __construct( $name = 'Deadendpages' ) {
32 parent::__construct( $name );
33 }
34
35 function getPageHeader() {
36 return $this->msg( 'deadendpagestext' )->parseAsBlock();
37 }
38
44 function isExpensive() {
45 return true;
46 }
47
48 function isSyndicated() {
49 return false;
50 }
51
55 function sortDescending() {
56 return false;
57 }
58
59 function getQueryInfo() {
60 return [
61 'tables' => [ 'page', 'pagelinks' ],
62 'fields' => [
63 'namespace' => 'page_namespace',
64 'title' => 'page_title',
65 'value' => 'page_title'
66 ],
67 'conds' => [
68 'pl_from IS NULL',
69 'page_namespace' => MWNamespace::getContentNamespaces(),
70 'page_is_redirect' => 0
71 ],
72 'join_conds' => [
73 'pagelinks' => [
74 'LEFT JOIN',
75 [ 'page_id=pl_from' ]
76 ]
77 ]
78 ];
79 }
80
81 function getOrderFields() {
82 // For some crazy reason ordering by a constant
83 // causes a filesort
84 if ( count( MWNamespace::getContentNamespaces() ) > 1 ) {
85 return [ 'page_namespace', 'page_title' ];
86 } else {
87 return [ 'page_title' ];
88 }
89 }
90
91 protected function getGroupName() {
92 return 'maintenance';
93 }
94}
A special page that list pages that contain no link to other pages.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
__construct( $name='Deadendpages')
isSyndicated()
Sometime we don't want to build rss / atom feeds.
getOrderFields()
Subclasses return an array of fields to order by here.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
isExpensive()
LEFT JOIN is expensive.
getPageHeader()
The content returned by this function will be output before any result.
Variant of QueryPage which formats the result as a simple link to the page.
msg( $key)
Wrapper around wfMessage that sets the current context.