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.
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:302
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition injection.txt:37