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 ) {
43 $nt = Title
::makeTitle( $result->namespace, $result->title
);
44 $text = $wgContLang->convert( $nt->getPrefixedText() );
46 $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
48 $nl = wfMsg( 'nlinks', $result->value
);
49 $nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
51 return "$plink ($nlink)";
58 function wfSpecialMostimages() {
59 list( $limit, $offset ) = wfCheckLimits();
61 $wpp = new MostimagesPage();
63 $wpp->doQuery( $offset, $limit );