MediaWiki REL1_33
SpecialMostimages.php
Go to the documentation of this file.
1<?php
33 function __construct( $name = 'Mostimages' ) {
34 parent::__construct( $name );
35 }
36
37 function isExpensive() {
38 return true;
39 }
40
41 function isSyndicated() {
42 return false;
43 }
44
45 function getQueryInfo() {
46 return [
47 'tables' => [ 'imagelinks' ],
48 'fields' => [
49 'namespace' => NS_FILE,
50 'title' => 'il_to',
51 'value' => 'COUNT(*)'
52 ],
53 'options' => [
54 'GROUP BY' => 'il_to',
55 'HAVING' => 'COUNT(*) > 1'
56 ]
57 ];
58 }
59
60 function getCellHtml( $row ) {
61 return $this->msg( 'nimagelinks' )->numParams( $row->value )->escaped() . '<br />';
62 }
63
64 protected function getGroupName() {
65 return 'highuse';
66 }
67}
Variant of QueryPage which uses a gallery to output results, thus suited for reports generating image...
A special page that lists most used images.
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
__construct( $name='Mostimages')
isSyndicated()
Sometime we don't want to build rss / atom feeds.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
getCellHtml( $row)
Get additional HTML to be shown in a results' cell.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
msg( $key)
Wrapper around wfMessage that sets the current context.
const NS_FILE
Definition Defines.php:79