From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- includes/specials/SpecialMostimages.php | 39 +++++++++++---------------------- 1 file changed, 13 insertions(+), 26 deletions(-) (limited to 'includes/specials/SpecialMostimages.php') diff --git a/includes/specials/SpecialMostimages.php b/includes/specials/SpecialMostimages.php index 411a281b..ac2b5206 100644 --- a/includes/specials/SpecialMostimages.php +++ b/includes/specials/SpecialMostimages.php @@ -31,24 +31,22 @@ */ class MostimagesPage extends ImageQueryPage { - function getName() { return 'Mostimages'; } + function __construct( $name = 'Mostimages' ) { + parent::__construct( $name ); + } + function isExpensive() { return true; } function isSyndicated() { return false; } - function getSQL() { - $dbr = wfGetDB( DB_SLAVE ); - $imagelinks = $dbr->tableName( 'imagelinks' ); - return - " - SELECT - 'Mostimages' as type, - " . NS_FILE . " as namespace, - il_to as title, - COUNT(*) as value - FROM $imagelinks - GROUP BY il_to - HAVING COUNT(*) > 1 - "; + function getQueryInfo() { + return array ( + 'tables' => array ( 'imagelinks' ), + 'fields' => array ( "'" . NS_FILE . "' AS namespace", + 'il_to AS title', + 'COUNT(*) AS value' ), + 'options' => array ( 'GROUP BY' => 'il_to', + 'HAVING' => 'COUNT(*) > 1' ) + ); } function getCellHtml( $row ) { @@ -58,14 +56,3 @@ class MostimagesPage extends ImageQueryPage { } } - -/** - * Constructor - */ -function wfSpecialMostimages() { - list( $limit, $offset ) = wfCheckLimits(); - - $wpp = new MostimagesPage(); - - $wpp->doQuery( $offset, $limit ); -} -- cgit v1.2.2