*/ /** * A special page page that list most used images * * @ingroup SpecialPage */ class MostimagesPage extends ImageQueryPage { function __construct( $name = 'Mostimages' ) { parent::__construct( $name ); } function isExpensive() { return true; } function isSyndicated() { return false; } function getQueryInfo() { return array( 'tables' => array( 'imagelinks' ), 'fields' => array( 'namespace' => NS_FILE, 'title' => 'il_to', 'value' => 'COUNT(*)' ), 'options' => array( 'GROUP BY' => 'il_to', 'HAVING' => 'COUNT(*) > 1' ) ); } function getCellHtml( $row ) { return $this->msg( 'nimagelinks' )->numParams( $row->value )->escaped() . '
'; } protected function getGroupName() { return 'highuse'; } }