MediaWiki master
SpecialUncategorizedImages.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Specials;
8
12
22
23 public function __construct( IConnectionProvider $dbProvider ) {
24 parent::__construct( 'Uncategorizedimages' );
25 $this->setDatabaseProvider( $dbProvider );
26 }
27
29 protected function sortDescending() {
30 return false;
31 }
32
34 public function isExpensive() {
35 return true;
36 }
37
39 public function isSyndicated() {
40 return false;
41 }
42
44 protected function getOrderFields() {
45 return [ 'title' ];
46 }
47
49 public function execute( $par ) {
50 $this->addHelpLink( 'Help:Categories' );
51 parent::execute( $par );
52 }
53
55 public function getQueryInfo() {
56 return [
57 'tables' => [ 'page', 'categorylinks' ],
58 'fields' => [
59 'namespace' => 'page_namespace',
60 'title' => 'page_title',
61 ],
62 'conds' => [
63 'cl_from' => null,
64 'page_namespace' => NS_FILE,
65 'page_is_redirect' => 0,
66 ],
67 'join_conds' => [
68 'categorylinks' => [
69 'LEFT JOIN',
70 'cl_from=page_id',
71 ],
72 ],
73 ];
74 }
75
77 protected function getRecacheDB() {
78 return $this->getDatabaseProvider()->getReplicaDatabase(
79 CategoryLinksTable::VIRTUAL_DOMAIN,
80 'vslow'
81 );
82 }
83
85 protected function getGroupName() {
86 return 'maintenance';
87 }
88}
89
94class_alias( SpecialUncategorizedImages::class, 'SpecialUncategorizedImages' );
const NS_FILE
Definition Defines.php:57
Variant of QueryPage which uses a gallery to output results, thus suited for reports generating image...
setDatabaseProvider(IConnectionProvider $databaseProvider)
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
List of file pages which haven't been categorised.
isSyndicated()
Sometimes we don't want to build rss / atom feeds.to override bool
execute( $par)
This is the actual workhorse.It does everything needed to make a real, honest-to-gosh query page....
sortDescending()
Override to sort by increasing values.to override bool
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getRecacheDB()
Get a DB connection to be used for slow recache queries.to override IReadableDatabase
isExpensive()
Should this query page only be updated offline on large wikis?If the query for this page is considere...
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
getOrderFields()
Subclasses return an array of fields to order by here.Don't append DESC to the field names,...
Provide primary and replica IDatabase connections.