Last modified: 2008-09-06 12:19:22 UTC
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:75.67.179.152" 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.
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.
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. :)
Created attachment 5296 [details] Patch The attached patch adds rcprop=loginfo, which adds the logid, logtype and logaction fields, along with the log parameters, to the output.
Thanks :)
Fixed in r40529