r59123 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59122‎ | r59123 | r59124 >
Date:23:31, 15 November 2009
Author:greg
Status:reverted (Comments)
Tags:
Comment:
Allow $wgMaxCredits to work for database backends with non-magic group by behavior.
Bug 21196
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -710,12 +710,19 @@
711711
712712 $deletedBit = $dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ); // username hidden?
713713
714 - $sql = "SELECT {$userTable}.*, rev_user_text as user_name, MAX(rev_timestamp) as timestamp
715 - FROM $revTable LEFT JOIN $userTable ON rev_user = user_id
 714+ $groupby = 'rev_user, rev_user_text';
 715+ if (! $dbr->implicitGroupby()) {
 716+ $groupby .= ', user_id, user_name, user_real_name, user_email, user_editcount';
 717+ }
 718+
 719+ $sql = "SELECT user_id, user_name, user_real_name, user_email, user_editcount,
 720+ rev_user_text AS user_name, MAX(rev_timestamp) AS timestamp
 721+ FROM $revTable
 722+ LEFT JOIN $userTable ON rev_user = user_id
716723 WHERE rev_page = $pageId
717724 $excludeCond
718725 AND $deletedBit = 0
719 - GROUP BY rev_user, rev_user_text
 726+ GROUP BY $groupby
720727 ORDER BY timestamp DESC";
721728
722729 if ( $limit > 0 )
Index: trunk/phase3/RELEASE-NOTES
@@ -636,6 +636,8 @@
637637 * (bug 19391) Fix caching for Recent ChangesFeed.
638638 * (bug 21455) Fixed "Watch this page" checkbox appearing on some special pages
639639 even to non-logged in users
 640+* (bug 21196) Allow $wgMaxCredits to work for Postgres (and possible other
 641+ non-MySQL) backends.
640642
641643 == API changes in 1.16 ==
642644

Follow-up revisions

RevisionCommit summaryAuthorDate
r87129* (bug 21196) Article::getContributors() no longer fail on PostgreSQL...ialex18:27, 29 April 2011
r87152Revert r87129 "(bug 21196) Article::getContributors() no longer fail on Postg...brion23:57, 29 April 2011

Comments

#Comment by IAlex (talk | contribs)   13:29, 16 November 2009

This produces the following warnings (on translatewiki.net):

[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_password in /var/www/w/includes/User.php on line 972
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_newpassword in /var/www/w/includes/User.php on line 973
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_newpass_time in /var/www/w/includes/User.php on line 974
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_options in /var/www/w/includes/User.php on line 976
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_touched in /var/www/w/includes/User.php on line 977
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_token in /var/www/w/includes/User.php on line 978
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_email_authenticated in /var/www/w/includes/User.php on line 979
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_email_token in /var/www/w/includes/User.php on line 980
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_email_token_expires in /var/www/w/includes/User.php on line 981
[16-Nov-2009 13:09:23] PHP Notice:  Undefined property:  stdClass::$user_registration in /var/www/w/includes/User.php on line 982
#Comment by IAlex (talk | contribs)   13:46, 16 November 2009

Reverted in r59131.

Status & tagging log