User "Brion VIBBER" posted a comment on MediaWiki.r100286.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100286#c24601
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:

Nothing I see is exploding yet; individual calls via 
Revision::newFrom(Id|Title|PageId) seem to work fetching individual current or 
given revision ID. Moving the rev_page condition over into the join conditions 
seems to work ok with no side effects that I've come across.

I'm not sure we've used COALESCE() before, but it looks like it should work on 
MySQL, PostgreSQL, SQLite, MS SQL, and Oracle.

Various pagers that are still pulling general fields may not be seeing the user 
fields at this time, so will keep on using whatever's in rev_text.

A possible issue: if a user table entry for id=0 gets into the system, its 
username will start taking over from the data stored in rev_user_text. That 
shouldn't happen of course, but ....

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to