From 3e57dec564ae8b8510342693ac921e83ac300b36 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Sat, 9 Dec 2006 15:49:13 +0000 Subject: [PATCH] Allow "ORDER BY value" to do its thing for databases without special magic. Per bug 8200. --- includes/SpecialCategories.php | 2 +- includes/SpecialUnusedcategories.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SpecialCategories.php b/includes/SpecialCategories.php index 89cff20a05..46601efc7e 100644 --- a/includes/SpecialCategories.php +++ b/includes/SpecialCategories.php @@ -33,7 +33,7 @@ class CategoriesPage extends QueryPage { $s= "SELECT 'Categories' as type, {$NScat} as namespace, cl_to as title, - 1 as value, + cl_to as value, COUNT(*) as count FROM $categorylinks GROUP BY 1,2,3,4"; diff --git a/includes/SpecialUnusedcategories.php b/includes/SpecialUnusedcategories.php index 6520513ff9..80f46a8798 100644 --- a/includes/SpecialUnusedcategories.php +++ b/includes/SpecialUnusedcategories.php @@ -25,7 +25,7 @@ class UnusedCategoriesPage extends QueryPage { $dbr =& wfGetDB( DB_SLAVE ); list( $categorylinks, $page ) = $dbr->tableNamesN( 'categorylinks', 'page' ); return "SELECT 'Unusedcategories' as type, - {$NScat} as namespace, page_title as title, 1 as value + {$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 -- 2.20.1