MediaWiki  1.29.2
SpecialUncategorizedpages.php
Go to the documentation of this file.
1 <?php
31  protected $requestedNamespace = false;
32 
33  function __construct( $name = 'Uncategorizedpages' ) {
34  parent::__construct( $name );
35  }
36 
37  function sortDescending() {
38  return false;
39  }
40 
41  function isExpensive() {
42  return true;
43  }
44 
45  function isSyndicated() {
46  return false;
47  }
48 
49  function getQueryInfo() {
50  return [
51  'tables' => [ 'page', 'categorylinks' ],
52  'fields' => [
53  'namespace' => 'page_namespace',
54  'title' => 'page_title',
55  'value' => 'page_title'
56  ],
57  // default for page_namespace is all content namespaces (if requestedNamespace is false)
58  // otherwise, page_namespace is requestedNamespace
59  'conds' => [
60  'cl_from IS NULL',
61  'page_namespace' => $this->requestedNamespace !== false
62  ? $this->requestedNamespace
64  'page_is_redirect' => 0
65  ],
66  'join_conds' => [
67  'categorylinks' => [ 'LEFT JOIN', 'cl_from = page_id' ]
68  ]
69  ];
70  }
71 
72  function getOrderFields() {
73  // For some crazy reason ordering by a constant
74  // causes a filesort
75  if ( $this->requestedNamespace === false && count( MWNamespace::getContentNamespaces() ) > 1 ) {
76  return [ 'page_namespace', 'page_title' ];
77  }
78 
79  return [ 'page_title' ];
80  }
81 
82  protected function getGroupName() {
83  return 'maintenance';
84  }
85 }
UncategorizedPagesPage\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialUncategorizedpages.php:82
captcha-old.count
count
Definition: captcha-old.py:225
UncategorizedPagesPage\__construct
__construct( $name='Uncategorizedpages')
Definition: SpecialUncategorizedpages.php:33
UncategorizedPagesPage\getOrderFields
getOrderFields()
Subclasses return an array of fields to order by here.
Definition: SpecialUncategorizedpages.php:72
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:304
MWNamespace\getContentNamespaces
static getContentNamespaces()
Get a list of all namespace indices which are considered to contain content.
Definition: MWNamespace.php:339
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
PageQueryPage
Variant of QueryPage which formats the result as a simple link to the page.
Definition: PageQueryPage.php:32
UncategorizedPagesPage\isSyndicated
isSyndicated()
Sometime we don't want to build rss / atom feeds.
Definition: SpecialUncategorizedpages.php:45
UncategorizedPagesPage\isExpensive
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
Definition: SpecialUncategorizedpages.php:41
UncategorizedPagesPage\getQueryInfo
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
Definition: SpecialUncategorizedpages.php:49
UncategorizedPagesPage\sortDescending
sortDescending()
Override to sort by increasing values.
Definition: SpecialUncategorizedpages.php:37
UncategorizedPagesPage\$requestedNamespace
$requestedNamespace
Definition: SpecialUncategorizedpages.php:31
UncategorizedPagesPage
A special page looking for page without any category.
Definition: SpecialUncategorizedpages.php:30