MediaWiki  1.30.0
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
85  return [ 'page_namespace', 'page_title' ];
86  } else {
87  return [ 'page_title' ];
88  }
89  }
90 
91  protected function getGroupName() {
92  return 'maintenance';
93  }
94 }
DeadendPagesPage
A special page that list pages that contain no link to other pages.
Definition: SpecialDeadendpages.php:29
SpecialPage\msg
msg( $key)
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:746
DeadendPagesPage\sortDescending
sortDescending()
Definition: SpecialDeadendpages.php:55
captcha-old.count
count
Definition: captcha-old.py:249
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:302
DeadendPagesPage\getOrderFields
getOrderFields()
Subclasses return an array of fields to order by here.
Definition: SpecialDeadendpages.php:81
MWNamespace\getContentNamespaces
static getContentNamespaces()
Get a list of all namespace indices which are considered to contain content.
Definition: MWNamespace.php:353
php
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:35
DeadendPagesPage\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialDeadendpages.php:91
DeadendPagesPage\isExpensive
isExpensive()
LEFT JOIN is expensive.
Definition: SpecialDeadendpages.php:44
PageQueryPage
Variant of QueryPage which formats the result as a simple link to the page.
Definition: PageQueryPage.php:32
DeadendPagesPage\__construct
__construct( $name='Deadendpages')
Definition: SpecialDeadendpages.php:31
DeadendPagesPage\isSyndicated
isSyndicated()
Sometime we don't want to build rss / atom feeds.
Definition: SpecialDeadendpages.php:48
DeadendPagesPage\getQueryInfo
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
Definition: SpecialDeadendpages.php:59
DeadendPagesPage\getPageHeader
getPageHeader()
The content returned by this function will be output before any result.
Definition: SpecialDeadendpages.php:35