summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialWantedfiles.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/SpecialWantedfiles.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/SpecialWantedfiles.php')
-rw-r--r--includes/specials/SpecialWantedfiles.php45
1 files changed, 16 insertions, 29 deletions
diff --git a/includes/specials/SpecialWantedfiles.php b/includes/specials/SpecialWantedfiles.php
index d6c1157b..8a4fe56f 100644
--- a/includes/specials/SpecialWantedfiles.php
+++ b/includes/specials/SpecialWantedfiles.php
@@ -31,8 +31,8 @@
*/
class WantedFilesPage extends WantedQueryPage {
- function getName() {
- return 'Wantedfiles';
+ function __construct( $name = 'Wantedfiles' ) {
+ parent::__construct( $name );
}
/**
@@ -45,32 +45,19 @@ class WantedFilesPage extends WantedQueryPage {
return true;
}
- function getSQL() {
- $dbr = wfGetDB( DB_SLAVE );
- list( $imagelinks, $image ) = $dbr->tableNamesN( 'imagelinks', 'image' );
- $name = $dbr->addQuotes( $this->getName() );
- return
- "
- SELECT
- $name as type,
- " . NS_FILE . " as namespace,
- il_to as title,
- COUNT(*) as value
- FROM $imagelinks
- LEFT JOIN $image ON il_to = img_name
- WHERE img_name IS NULL
- GROUP BY il_to
- ";
+ function getQueryInfo() {
+ return array (
+ 'tables' => array ( 'imagelinks', 'image' ),
+ 'fields' => array ( "'" . NS_FILE . "' AS namespace",
+ 'il_to AS title',
+ 'COUNT(*) AS value' ),
+ 'conds' => array ( 'img_name IS NULL' ),
+ 'options' => array ( 'GROUP BY' => 'il_to' ),
+ 'join_conds' => array ( 'image' =>
+ array ( 'LEFT JOIN',
+ array ( 'il_to = img_name' )
+ )
+ )
+ );
}
}
-
-/**
- * constructor
- */
-function wfSpecialWantedFiles() {
- list( $limit, $offset ) = wfCheckLimits();
-
- $wpp = new WantedFilesPage();
-
- $wpp->doQuery( $offset, $limit );
-}