From: Antoine Musso Date: Tue, 1 Nov 2011 13:14:59 +0000 (+0000) Subject: Fix GROUP BY clause in Special:MostLinkedTemplates X-Git-Tag: 1.31.0-rc.0~26789 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=2f233ed1c617cfdf300f13d8472ff762b4813cee;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ) ); }