4 * @subpackage 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
13 * @subpackage SpecialPage
15 class MostimagesPage
extends QueryPage
{
17 function getName() { return 'Mostimages'; }
18 function isExpensive() { return true; }
19 function isSyndicated() { return false; }
22 $dbr =& wfGetDB( DB_SLAVE
);
23 $imagelinks = $dbr->tableName( 'imagelinks' );
28 " . NS_IMAGE
. " as namespace,
37 function formatResult( $skin, $result ) {
38 global $wgLang, $wgContLang;
40 $nt = Title
::makeTitle( $result->namespace, $result->title
);
41 $text = $wgContLang->convert( $nt->getPrefixedText() );
43 $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
45 $nl = wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
46 $wgLang->formatNum ( $result->value
) );
47 $nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
49 return wfSpecialList($plink, $nlink);
56 function wfSpecialMostimages() {
57 list( $limit, $offset ) = wfCheckLimits();
59 $wpp = new MostimagesPage();
61 $wpp->doQuery( $offset, $limit );