Last modified: 2014-03-24 15:27:42 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 T64908, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62908 - Dummy edits not tagged by oAuth
Dummy edits not tagged by oAuth
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
OAuth (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-21 01:58 UTC by Bawolff (Brian Wolff)
Modified: 2014-03-24 15:27 UTC (History)
4 users (show)

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


Attachments

Comment 1 Brad Jorsch 2014-03-21 14:16:04 UTC
(In reply to Bawolff (Brian Wolff) from comment #0)
> Perhaps something to do with the dummy edit being hidden from RC (?)

That is very likely the case: OAuth uses the RecentChange_save hook to tag things (see MWOAuthAPISetup::onRecentChange_save), so if that hook doesn't get called for the dummy edit then OAuth won't tag it.

The next step here would be to identify (or add) a hook that is called when these dummy edits are created but not saved as recent changes, so we can hook that too. I'm not terribly familiar with the uploading code path, so if you are and can point to where the dummy edit gets created that would be helpful. Otherwise I'll try to remember to track it down later.[1]


 [1]: (although what'll probably happen then is that I'll forget until Andre pings us in a few months asking if there's any progress)
Comment 2 Bawolff (Brian Wolff) 2014-03-22 00:06:59 UTC
It's created with a line like:
                        $status = $wikiPage->doEditContent(
                                $content,
                                $comment,
                                EDIT_NEW | EDIT_SUPPRESS_RC,
                                false,
                                $user
                        );
in LocalFile::recordUpload2. (A slightly different but similar code path is used for re-uploads)

Could perhaps add $flags to NewRevisionFromEditComplete hook.
Comment 3 Brad Jorsch 2014-03-24 15:27:42 UTC
Thanks for that, now I see where to look in the code.

NewRevisionFromEditComplete looks like it'd probably be a good hook to use since it seems to be called from a few other relevant code paths too that directly insert the revision. Unfortunately, it also looks like you're right that we'd need to add some sort of flagging to the hook (although that seems a bit "ugh" to me considering every other caller would probably have to fake it), or else fix ChangeTags::addTags so that calling ChangeTags::addTags( $tags, null, $rev_id, null ) then ChangeTags::addTags( $tags, $rc_id, $rev_id, $log_id ) will update the change_tag table with the $rc_id and $log_id instead of just completely ignoring the second call.

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


Navigation
Links