MediaWiki REL1_37
SpecialWantedTemplates.php
Go to the documentation of this file.
1<?php
31
38
43 public function __construct(
46 ) {
47 parent::__construct( 'Wantedtemplates' );
48 $this->setDBLoadBalancer( $loadBalancer );
49 $this->setLinkBatchFactory( $linkBatchFactory );
50 }
51
52 public function getQueryInfo() {
53 return [
54 'tables' => [ 'templatelinks', 'page' ],
55 'fields' => [
56 'namespace' => 'tl_namespace',
57 'title' => 'tl_title',
58 'value' => 'COUNT(*)'
59 ],
60 'conds' => [
61 'page_title IS NULL',
62 'tl_namespace' => NS_TEMPLATE
63 ],
64 'options' => [ 'GROUP BY' => [ 'tl_namespace', 'tl_title' ] ],
65 'join_conds' => [ 'page' => [ 'LEFT JOIN',
66 [ 'page_namespace = tl_namespace',
67 'page_title = tl_title' ] ] ]
68 ];
69 }
70
71 protected function getGroupName() {
72 return 'maintenance';
73 }
74}
const NS_TEMPLATE
Definition Defines.php:74
setDBLoadBalancer(ILoadBalancer $loadBalancer)
LinkBatchFactory null $linkBatchFactory
Definition QueryPage.php:74
setLinkBatchFactory(LinkBatchFactory $linkBatchFactory)
ILoadBalancer null $loadBalancer
Definition QueryPage.php:71
A querypage to list the most wanted templates.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
__construct(ILoadBalancer $loadBalancer, LinkBatchFactory $linkBatchFactory)
Class definition for a wanted query page like WantedPages, WantedTemplates, etc.
Database cluster connection, tracking, load balancing, and transaction manager interface.