summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialMostimages.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /includes/specials/SpecialMostimages.php
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'includes/specials/SpecialMostimages.php')
-rw-r--r--includes/specials/SpecialMostimages.php39
1 files changed, 13 insertions, 26 deletions
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 );
-}