Add rc.unpatrolled to the recentchanges API
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 25 Oct 2013 08:25:48 +0000 (10:25 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Fri, 25 Oct 2013 15:26:43 +0000 (17:26 +0200)
commit5f078d3e56506700db5f11c1f62f7a8c8cbcc296
tree128ed1d76e5a73ede01e556d1fcb016912aa16d3
parentd6c2fcb8c4b7772ef52b6ce3e7b10f82d1da5a2b
Add rc.unpatrolled to the recentchanges API

On SpecialRecentChanges, the unpatrolled "bang" icon is only
rendered when:
- the user has the patrol right.
- the rc type is EDIT and rcpatrol is permitted, or
  the tc type is NEW and nppatrol is permitted.
- the rc event is in fact still unpatrolled.

In other words, when an edit is patrollable and unpatrolled.

However, consumers of the API are unable to render this because
the API only has a boolean "patrolled" attribute. Apps using
the absence of "patrolled" and presence of "patrol" right as
meaning "unpatrolled" get into trouble on wikis with RCpatrol
disabled and NPpatrol enabled. In those cases the app would
render a change as unpatrolled, but when the user clicks it
find out it can't be patrolled.

This adds an "unpatrolled" flag that does just that.

Change-Id: Ic947c6c75eb7936fcebdccbcd27ff62e07f1feda
includes/api/ApiQueryRecentChanges.php
includes/changes/ChangesList.php