3 * @addtogroup SpecialPage
5 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
6 * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
7 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
11 * @addtogroup SpecialPage
13 class MostimagesPage
extends QueryPage
{
15 function getName() { return 'Mostimages'; }
16 function isExpensive() { return true; }
17 function isSyndicated() { return false; }
20 $dbr = wfGetDB( DB_SLAVE
);
21 $imagelinks = $dbr->tableName( 'imagelinks' );
26 " . NS_IMAGE
. " as namespace,
35 function formatResult( $skin, $result ) {
36 global $wgLang, $wgContLang;
38 $nt = Title
::makeTitle( $result->namespace, $result->title
);
39 $text = $wgContLang->convert( $nt->getPrefixedText() );
41 $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
43 $nl = wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
44 $wgLang->formatNum ( $result->value
) );
45 $nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
47 return wfSpecialList($plink, $nlink);
54 function wfSpecialMostimages() {
55 list( $limit, $offset ) = wfCheckLimits();
57 $wpp = new MostimagesPage();
59 $wpp->doQuery( $offset, $limit );