more specific error message, using WikiError, if user trys to create account with...
[mediawiki.git] / includes / specials / SpecialMostimages.php
blob5cc100baba18b35fe5781af589b31c955d0160bc
1 <?php
2 /**
3 * @file
4 * @ingroup SpecialPage
6 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
7 * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
8 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
9 */
11 /**
12 * implements Special:Mostimages
13 * @ingroup SpecialPage
15 class MostimagesPage extends ImageQueryPage {
17 function getName() { return 'Mostimages'; }
18 function isExpensive() { return true; }
19 function isSyndicated() { return false; }
21 function getSQL() {
22 $dbr = wfGetDB( DB_SLAVE );
23 $imagelinks = $dbr->tableName( 'imagelinks' );
24 return
26 SELECT
27 'Mostimages' as type,
28 " . NS_FILE . " as namespace,
29 il_to as title,
30 COUNT(*) as value
31 FROM $imagelinks
32 GROUP BY il_to
33 HAVING COUNT(*) > 1
37 function getCellHtml( $row ) {
38 global $wgLang;
39 return wfMsgExt( 'nlinks', array( 'parsemag', 'escape' ),
40 $wgLang->formatNum( $row->value ) ) . '<br />';
45 /**
46 * Constructor
48 function wfSpecialMostimages() {
49 list( $limit, $offset ) = wfCheckLimits();
51 $wpp = new MostimagesPage();
53 $wpp->doQuery( $offset, $limit );