From 2f233ed1c617cfdf300f13d8472ff762b4813cee Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 1 Nov 2011 13:14:59 +0000 Subject: [PATCH] Fix GROUP BY clause in Special:MostLinkedTemplates This only cause a trouble for Microsoft SQL which require the column to be referenced by their input name, not the output one (AS alias). Might trigger on Oracle database. This is part of bug 31913: 'GROUP BY clauses incorrect in SQL generated for special pages' Need backport in REL1_18 --- RELEASE-NOTES-1.18 | 2 ++ includes/specials/SpecialMostlinkedtemplates.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.18 b/RELEASE-NOTES-1.18 index 9815df8d04..ded58d1efd 100644 --- a/RELEASE-NOTES-1.18 +++ b/RELEASE-NOTES-1.18 @@ -656,6 +656,8 @@ changes to languages because of Bugzilla reports. * (bug 30817) Restored linktrail for kk (Kazakh) * (bug 27398) Add $wgExtraGenderNamespaces for configured gendered namespaces * (bug 30846) New LanguageOs class +* (bug 31913) Special:MostLinkedTemplates had an incorrect GROUP BY clause + under Microsoft SQL. === Other changes in 1.18 === * Removed legacy wgAjaxWatch javascript global object, no longer in use. diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php index ab9e152739..406173a7aa 100644 --- a/includes/specials/SpecialMostlinkedtemplates.php +++ b/includes/specials/SpecialMostlinkedtemplates.php @@ -68,7 +68,7 @@ class MostlinkedTemplatesPage extends QueryPage { 'tl_title AS title', 'COUNT(*) AS value' ), 'conds' => array ( 'tl_namespace' => NS_TEMPLATE ), - 'options' => array( 'GROUP BY' => 'namespace, title' ) + 'options' => array( 'GROUP BY' => 'tl_namespace, tl_title' ) ); } -- 2.20.1