MediaWiki REL1_31
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...