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/SpecialWantedtemplates.php | 44 ++++++++++------------------ 1 file changed, 16 insertions(+), 28 deletions(-) (limited to 'includes/specials/SpecialWantedtemplates.php') diff --git a/includes/specials/SpecialWantedtemplates.php b/includes/specials/SpecialWantedtemplates.php index ae43c237..ab9d6046 100644 --- a/includes/specials/SpecialWantedtemplates.php +++ b/includes/specials/SpecialWantedtemplates.php @@ -33,35 +33,23 @@ */ class WantedTemplatesPage extends WantedQueryPage { - function getName() { - return 'Wantedtemplates'; + function __construct( $name = 'Wantedtemplates' ) { + parent::__construct( $name ); } - function getSQL() { - $dbr = wfGetDB( DB_SLAVE ); - list( $templatelinks, $page ) = $dbr->tableNamesN( 'templatelinks', 'page' ); - $name = $dbr->addQuotes( $this->getName() ); - return - " - SELECT $name as type, - tl_namespace as namespace, - tl_title as title, - COUNT(*) as value - FROM $templatelinks LEFT JOIN - $page ON tl_title = page_title AND tl_namespace = page_namespace - WHERE page_title IS NULL AND tl_namespace = ". NS_TEMPLATE ." - GROUP BY tl_namespace, tl_title - "; + function getQueryInfo() { + return array ( + 'tables' => array ( 'templatelinks', 'page' ), + 'fields' => array ( 'tl_namespace AS namespace', + 'tl_title AS title', + 'COUNT(*) AS value' ), + 'conds' => array ( 'page_title IS NULL', + 'tl_namespace' => NS_TEMPLATE ), + 'options' => array ( + 'GROUP BY' => 'tl_namespace, tl_title' ), + 'join_conds' => array ( 'page' => array ( 'LEFT JOIN', + array ( 'page_namespace = tl_namespace', + 'page_title = tl_title' ) ) ) + ); } } - -/** - * constructor - */ -function wfSpecialWantedTemplates() { - list( $limit, $offset ) = wfCheckLimits(); - - $wpp = new WantedTemplatesPage(); - - $wpp->doQuery( $offset, $limit ); -} -- cgit v1.2.2