MediaWiki REL1_33
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 ],
56 // default for page_namespace is all content namespaces (if requestedNamespace is false)
57 // otherwise, page_namespace is requestedNamespace
58 'conds' => [
59 'cl_from IS NULL',
60 'page_namespace' => $this->requestedNamespace !== false
61 ? $this->requestedNamespace
62 : MWNamespace::getContentNamespaces(),
63 'page_is_redirect' => 0
64 ],
65 'join_conds' => [
66 'categorylinks' => [ 'LEFT JOIN', 'cl_from = page_id' ]
67 ]
68 ];
69 }
70
71 function getOrderFields() {
72 // For some crazy reason ordering by a constant
73 // causes a filesort
74 if ( $this->requestedNamespace === false && count( MWNamespace::getContentNamespaces() ) > 1 ) {
75 return [ 'page_namespace', 'page_title' ];
76 }
77
78 return [ 'page_title' ];
79 }
80
81 protected function getGroupName() {
82 return 'maintenance';
83 }
84}
Variant of QueryPage which formats the result as a simple link to the page.
A special page looking for page without any category.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
__construct( $name='Uncategorizedpages')
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
getOrderFields()
Subclasses return an array of fields to order by here.
isSyndicated()
Sometime we don't want to build rss / atom feeds.
sortDescending()
Override to sort by increasing values.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Allows to change the fields on the form that will be generated $name
Definition hooks.txt:271
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