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/SpecialUnusedcategories.php | 34 +++++++++++---------------- 1 file changed, 14 insertions(+), 20 deletions(-) (limited to 'includes/specials/SpecialUnusedcategories.php') diff --git a/includes/specials/SpecialUnusedcategories.php b/includes/specials/SpecialUnusedcategories.php index ff2a66e1..e4b8e544 100644 --- a/includes/specials/SpecialUnusedcategories.php +++ b/includes/specials/SpecialUnusedcategories.php @@ -28,25 +28,26 @@ class UnusedCategoriesPage extends QueryPage { function isExpensive() { return true; } - function getName() { - return 'Unusedcategories'; + function __construct( $name = 'Unusedcategories' ) { + parent::__construct( $name ); } function getPageHeader() { return wfMsgExt( 'unusedcategoriestext', array( 'parse' ) ); } - function getSQL() { - $NScat = NS_CATEGORY; - $dbr = wfGetDB( DB_SLAVE ); - list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' ); - return "SELECT 'Unusedcategories' as type, - {$NScat} as namespace, page_title as title, page_title as value - FROM $page - LEFT JOIN $categorylinks ON page_title=cl_to - WHERE cl_from IS NULL - AND page_namespace = {$NScat} - AND page_is_redirect = 0"; + function getQueryInfo() { + return array ( + 'tables' => array ( 'page', 'categorylinks' ), + 'fields' => array ( 'page_namespace AS namespace', + 'page_title AS title', + 'page_title AS value' ), + 'conds' => array ( 'cl_from IS NULL', + 'page_namespace' => NS_CATEGORY, + 'page_is_redirect' => 0 ), + 'join_conds' => array ( 'categorylinks' => array ( + 'LEFT JOIN', 'cl_to = page_title' ) ) + ); } /** @@ -61,10 +62,3 @@ class UnusedCategoriesPage extends QueryPage { return $skin->link( $title, $title->getText() ); } } - -/** constructor */ -function wfSpecialUnusedCategories() { - list( $limit, $offset ) = wfCheckLimits(); - $uc = new UnusedCategoriesPage(); - return $uc->doQuery( $offset, $limit ); -} -- cgit v1.2.2