Last modified: 2011-03-19 10:30:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29899, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27899 - Special:NewPages does not handle RevisionDeletion
Special:NewPages does not handle RevisionDeletion
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Revision deletion (Other open bugs)
1.18.x
All All
: Normal major (vote)
: ---
Assigned To: Aaron Schulz
: patch, patch-reviewed
Depends on:
Blocks: revdel
  Show dependency treegraph
 
Reported: 2011-03-06 17:51 UTC by db [inactive,noenotif]
Modified: 2011-03-19 10:30 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Functional patch v1 (15.80 KB, patch)
2011-03-16 21:55 UTC, Jarry1250
Details
Functional patch v2 (1.14 KB, patch)
2011-03-16 22:02 UTC, Jarry1250
Details
Patch v3: Handle revdel'd usernames as well as comments (1.50 KB, patch)
2011-03-16 22:35 UTC, Jarry1250
Details

Description db [inactive,noenotif] 2011-03-06 17:51:42 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.
Comment 1 Jarry1250 2011-03-16 21:55:46 UTC
Created attachment 8301 [details]
Functional patch v1

A nice little patch to fix this. Slightly hackish, I suppose, but neat and functional nonetheless.
Comment 2 Jarry1250 2011-03-16 22:02:01 UTC
Created attachment 8302 [details]
Functional patch v2

This one is actually the patch.
Comment 3 Bryan Tong Minh 2011-03-16 22:07:27 UTC
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.
Comment 4 Jarry1250 2011-03-16 22:35:31 UTC
Created attachment 8304 [details]
Patch v3: Handle revdel'd usernames as well as comments
Comment 5 Jarry1250 2011-03-16 22:54:38 UTC
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.
Comment 6 db [inactive,noenotif] 2011-03-17 18:06:57 UTC
recentchanges table has a rc_deleted field, which should work here.

http://www.mediawiki.org/wiki/Manual:Recentchanges_table#rc_deleted
Comment 7 Jarry1250 2011-03-17 19:37:03 UTC
That's what I'm using in the patch :)
Comment 8 db [inactive,noenotif] 2011-03-18 20:01:51 UTC
Sorry, the diff is shown very small on my screen.

Maybe use ChangesList::isDeleted instead of creating a new Revision object.
Comment 9 Mark A. Hershberger 2011-03-18 20:47:06 UTC
Patch applied in r84263
Comment 10 Jarry1250 2011-03-19 10:30:54 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links