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/SpecialWantedfiles.php | 45 ++++++++++++-------------------- 1 file changed, 16 insertions(+), 29 deletions(-) (limited to 'includes/specials/SpecialWantedfiles.php') 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 ); -} -- cgit v1.2.2