User "Brion VIBBER" posted a comment on MediaWiki.r100286. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100286#c24603 Commit summary:
* Tweaked Revision class to handle loading the current user name instead of rev_user_text. It still falls back to rev_user_text when building objects from DB rows for b/c. * Moved JOIN conds to fetchFromConds() as that's where the tables are specified. This lets us avoid the same page_id=rev_page join conds plastered all over the code. Also, we can't mix WHERE and JOIN style join conds. * Removed duplication in fetchFromConds() by using selectPageFields(). * Removed duplicate rev_parent_id field from contribs SELECT. Yo make use of these changes, Pagers and lists still need to be updated to use Revision::selectUserFields() and join on the user table. Comment: On a more future-focused view as well; good user-info components in big table lists etc may at some point want to pull in much more user info, such as real name, avatar, user groups, etc. Longer-term it's maybe better to encourage a batch-lookup and common output system for user references pulled from whatever sources, so every query doesn't have to have multiple fields added to it with a user join. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
