list=recentchanges&rctype=log does't list log action
Closed, ResolvedPublic


Author: matthew.britton

In the recent changes API, with everything that can possibly appear in 'rcprop' set (user|comment|flags|timestamp|title|ids|sizes|redirect|patrolled), items of type="log" appear as in the following example:

<rc type="log" ns="2" title="User:" rcid="242233392" pageid="0" revid="0" old_revid="0" user="LessHeard vanU" oldlen="0" newlen="0" timestamp="2008-09-05T22:08:27Z" comment="[[WP:Disruptive editing|Disruptive editing]]: return to vandalism that incurred previous blocks" patrolled="" />

There is no field for the type of action! The only way I can tell that this is a block is from the edit summary; if there was no summary supplied, I wouldn't know whether it was a block, deletion, protection or something else, and the API is meant for machines, which are not clever enough to infer the meaning of an edit summary.

Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-API.Via ConduitNov 21 2014, 10:21 PM
bzimport set Reference to bz15492.
bzimport created this task.Via LegacySep 5 2008, 10:15 PM
Catrope added a comment.Via ConduitSep 6 2008, 11:41 AM

Changing summary: this isn't broken, but a feature request.

I'll write up a patch that implements this. Of course, if you're only interested in log events, you could simply use list=logevents which *does* list the action.

bzimport added a comment.Via ConduitSep 6 2008, 12:07 PM

matthew.britton wrote:

It is broken in the sense that it worked in MediaWiki 1.12, where the 'title' parameter was given as "Special:Log/[action]" for log entries. I assume a rewrite at some point changed that. It's also broken in the sense that it's not usable for any useful purpose. :)

I'm aware of list=logevents, but if I need all recent changes *and* log actions, it's much quicker and easier if I only have to make one query instead of two. If there was no "rctype=log" action I wouldn't object, but it seems silly to have one but not be able to use it. :)

Catrope added a comment.Via ConduitSep 6 2008, 12:08 PM

Created attachment 5296

The attached patch adds rcprop=loginfo, which adds the logid, logtype and logaction fields, along with the log parameters, to the output.

Attached: 15492.patch

bzimport added a comment.Via ConduitSep 6 2008, 12:09 PM

matthew.britton wrote:

Thanks :)

Catrope added a comment.Via ConduitSep 6 2008, 12:19 PM

Fixed in r40529

Add Comment