From 82425377cd1f3d8a84a9301c276731bc5e9244c9 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 16 Nov 2009 13:40:30 +0000 Subject: [PATCH] Revert recent change: more implicit fields are needed for the group by --- RELEASE-NOTES | 2 -- includes/Article.php | 13 +++---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index ce4d7096ce..d7ad7ae4d7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -636,8 +636,6 @@ Hopefully we will remove this configuration var soon) * (bug 19391) Fix caching for Recent ChangesFeed. * (bug 21455) Fixed "Watch this page" checkbox appearing on some special pages even to non-logged in users -* (bug 21196) Allow $wgMaxCredits to work for Postgres (and possible other - non-MySQL) backends. == API changes in 1.16 == diff --git a/includes/Article.php b/includes/Article.php index e06bd45144..3fb548a4bc 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -710,19 +710,12 @@ class Article { $deletedBit = $dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ); // username hidden? - $groupby = 'rev_user, rev_user_text'; - if (! $dbr->implicitGroupby()) { - $groupby .= ', user_id, user_name, user_real_name, user_email, user_editcount'; - } - - $sql = "SELECT user_id, user_name, user_real_name, user_email, user_editcount, - rev_user_text AS user_name, MAX(rev_timestamp) AS timestamp - FROM $revTable - LEFT JOIN $userTable ON rev_user = user_id + $sql = "SELECT {$userTable}.*, rev_user_text as user_name, MAX(rev_timestamp) as timestamp + FROM $revTable LEFT JOIN $userTable ON rev_user = user_id WHERE rev_page = $pageId $excludeCond AND $deletedBit = 0 - GROUP BY $groupby + GROUP BY rev_user, rev_user_text ORDER BY timestamp DESC"; if ( $limit > 0 ) -- 2.20.1