https://bugzilla.wikimedia.org/show_bug.cgi?id=31863

--- Comment #1 from Brion Vibber <[email protected]> 2011-10-21 22:07:38 UTC 
---
This may benefit from a tweak to internal APIs.

Revision::getUserText() / Revision::getRawUserText() currently pulls from the
rev_user_text field (unless it got overridden by a magic coalescy thingy in the
row). This means that anything pulling its own queries may be missing the
original names, as it'll be stuck with rev_user_text.

If joined columns from 'user' are available when initializing the Revision
object from a row, then we should use that directly; but if not, we could do an
on-demand lookup via the rev_user_id if it's non-zero (local user reference),
or keep the rev_user_text if it's zero (usually IP, sometimes named non-local
import markers).

With that in place, the worst case scenario should be that some batch queries
might be missing the join and end up doing some more row-by-row lookups
(they'll probably already be doing lots of those for user/talk page existence
checks, so don't worry!)... but they'll show the correct results.

Might also think about a Revision::getUserObj() or something that would hand
back a fully-ready User object, rather than having to cart around (id, text)
pairs all the time.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to