From: Greg Sabino Mullane Date: Sat, 9 Dec 2006 15:49:13 +0000 (+0000) Subject: Allow "ORDER BY value" to do its thing for databases without special magic. Per bug... X-Git-Tag: 1.31.0-rc.0~54952 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=3e57dec564ae8b8510342693ac921e83ac300b36;p=lhc%2Fweb%2Fwiklou.git Allow "ORDER BY value" to do its thing for databases without special magic. Per bug 8200. --- 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