(bug 35565) Special:Log/patrol doesn't indicate whether patrolling was automatic
[mediawiki.git] / includes / specials / SpecialWantedtemplates.php
blobab9d6046735bbf1514f8cfa9b55ad0fd18db636a
1 <?php
2 /**
3 * Implements Special:Wantedtemplates
5 * Copyright © 2008, Danny B.
6 * Based on SpecialWantedcategories.php by Ævar Arnfjörð Bjarmason <avarab@gmail.com>
7 * makeWlhLink() taken from SpecialMostlinkedtemplates by Rob Church <robchur@gmail.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * http://www.gnu.org/copyleft/gpl.html
24 * @file
25 * @ingroup SpecialPage
26 * @author Danny B.
29 /**
30 * A querypage to list the most wanted templates
32 * @ingroup SpecialPage
34 class WantedTemplatesPage extends WantedQueryPage {
36 function __construct( $name = 'Wantedtemplates' ) {
37 parent::__construct( $name );
40 function getQueryInfo() {
41 return array (
42 'tables' => array ( 'templatelinks', 'page' ),
43 'fields' => array ( 'tl_namespace AS namespace',
44 'tl_title AS title',
45 'COUNT(*) AS value' ),
46 'conds' => array ( 'page_title IS NULL',
47 'tl_namespace' => NS_TEMPLATE ),
48 'options' => array (
49 'GROUP BY' => 'tl_namespace, tl_title' ),
50 'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
51 array ( 'page_namespace = tl_namespace',
52 'page_title = tl_title' ) ) )