[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/specials/ -> SpecialWantedtemplates.php (source)

   1  <?php
   2  /**
   3   * Implements Special:Wantedtemplates
   4   *
   5   * Copyright © 2008, Danny B.
   6   * Based on SpecialWantedcategories.php by Ævar Arnfjörð Bjarmason <[email protected]>
   7   * makeWlhLink() taken from SpecialMostlinkedtemplates by Rob Church <[email protected]>
   8   *
   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.
  13   *
  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.
  18   *
  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
  23   *
  24   * @file
  25   * @ingroup SpecialPage
  26   * @author Danny B.
  27   */
  28  
  29  /**
  30   * A querypage to list the most wanted templates
  31   *
  32   * @ingroup SpecialPage
  33   */
  34  class WantedTemplatesPage extends WantedQueryPage {
  35  	function __construct( $name = 'Wantedtemplates' ) {
  36          parent::__construct( $name );
  37      }
  38  
  39  	function getQueryInfo() {
  40          return array(
  41              'tables' => array( 'templatelinks', 'page' ),
  42              'fields' => array(
  43                  'namespace' => 'tl_namespace',
  44                  'title' => 'tl_title',
  45                  'value' => 'COUNT(*)'
  46              ),
  47              'conds' => array(
  48                  'page_title IS NULL',
  49                  'tl_namespace' => NS_TEMPLATE
  50              ),
  51              'options' => array( 'GROUP BY' => array( 'tl_namespace', 'tl_title' ) ),
  52              'join_conds' => array( 'page' => array( 'LEFT JOIN',
  53                  array( 'page_namespace = tl_namespace',
  54                      'page_title = tl_title' ) ) )
  55          );
  56      }
  57  
  58  	protected function getGroupName() {
  59          return 'maintenance';
  60      }
  61  }


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1