Last modified: 2011-03-19 10:30:54 UTC
Special:NewPages does not handle RevisionDeletion. This means the hidden comment of a new created page is shown and the hidden user of a new created page is also shown.
Created attachment 8301 [details] Functional patch v1 A nice little patch to fix this. Slightly hackish, I suppose, but neat and functional nonetheless.
Created attachment 8302 [details] Functional patch v2 This one is actually the patch.
I haven't looked in detail to the code, but I think you need to move the construction of the Revision object higher up so that you can also hide rc_user_text. Also check whether the construction of a Revision object does cause an extra SQL query. Perhaps it is best to use Revision::selectFields() (not sure of the exact name) to get the required select fields.
Created attachment 8304 [details] Patch v3: Handle revdel'd usernames as well as comments
Oh, and no, Revision::construct() takes a database query result as a possible input (or an array, as here), it does not run its own, AFAICT.
recentchanges table has a rc_deleted field, which should work here. http://www.mediawiki.org/wiki/Manual:Recentchanges_table#rc_deleted
That's what I'm using in the patch :)
Sorry, the diff is shown very small on my screen. Maybe use ChangesList::isDeleted instead of creating a new Revision object.
Patch applied in r84263
Duplicatebug: That would be slightly more appropriate, agreed. However, since ChangesList isn't really set up for that, I think that may be the case of moving from one imperfect solution to another for only a slight gain. Maybe the preferable option would be to extend the capabilities of the Linker to handle both RC and Revision objects passed to it, then take ChangesList and NewPages over to using that. Much neater :) What do you think?