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
12 require_once 'QueryPage.php';
16 * @subpackage SpecialPage
18 class MostimagesPage
extends QueryPage
{
20 function getName() { return 'Mostimages'; }
21 function isExpensive() { return true; }
22 function isSyndicated() { return false; }
25 $dbr =& wfGetDB( DB_SLAVE
);
26 extract( $dbr->tableNames( 'imagelinks' ) );
31 " . NS_IMAGE
. " as namespace,
40 function formatResult( $skin, $result ) {
41 global $wgLang, $wgContLang;
43 $nt = Title
::makeTitle( $result->namespace, $result->title
);
44 $text = $wgContLang->convert( $nt->getPrefixedText() );
46 $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
48 $nl = wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
49 $wgLang->formatNum ( $result->value
) );
50 $nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
52 return wfSpecialList($plink, $nlink);
59 function wfSpecialMostimages() {
60 list( $limit, $offset ) = wfCheckLimits();
62 $wpp = new MostimagesPage();
64 $wpp->doQuery( $offset, $limit );