Page MenuHomePhabricator

Get data about current page protection patterns
Closed, ResolvedPublic5 Estimated Story Points

Description

In order to think about how page protection should change, we need some information about what the current practice it. Especially, it would be interesting to know, if specific protection patterns are used (e.g. no protection - semi protection - full protection - semi protection).

The idea is to build graphs that contain of three parts: The middle part is the protection level in question (i.e. semi protect). The first part is which level there was before the protection level was set to the one in question, and the third part is what it changed to.
The change doesn't necessarily need to have happened immediately after it, but after a reasonable timeframe (maybe 2 days?)

The questions that would be possible to answer is:
Is it true, that protection usually changes after expiry, to something else than "unprotected"?
Is there a typical protection pattern that is currently done manually?

Bonus questions:

  • How long are protections currently in place (ideally by level)?
  • is it always the same person who does the changes or are the multiple people responsible for protecting one site?

Background:
Wish #7 of the 2015 German-speaking community survey was T142209: Allow pages to have multiple overlapping protection levels

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
WMDE-leszek set the point value for this task to 5.Aug 11 2016, 3:05 PM
WMDE-leszek moved this task from Proposed to Backlog on the TCB-Team-Sprint-2016-08-11 board.

@Jan_Dittrich You should be able to access all of this via the api / dbs.

The tables that you can look at for current data are:
https://www.mediawiki.org/wiki/Manual:Page_restrictions_table
https://www.mediawiki.org/wiki/Manual:Protected_titles_table

Though this will not contain past data, for that you will need to extract stuff from the protection logs which can be found in:
https://www.mediawiki.org/wiki/Manual:Logging_table

Thanks, @Addshore!
I wonder about 2 things right now:

  1. What is the modified action? (https://www.mediawiki.org/wiki/Manual:Log_actions) It seems to be rather frequent.
  2. Connected with that (since if could tell me about the nature of actions): How can I access the parameters of the log actions (also on https://www.mediawiki.org/wiki/Manual:Log_actions) ?. The logging table's (https://www.mediawiki.org/wiki/Manual:Logging_table) param column seems not to be the right place, it is empty for me.

So modified will be when a protection is changed, for example the expiry is changed, or the level is changed.
the 'protect' action would be when there was no current protection level and one was added, and the 'unprotect' action will be when a page was previously protected but that was totally removed.

In regards to the params, as far as I can tell they are not always present as they have not always been present in the code, and thus they will only appear in logged actions that occurred after the date that they were introduced.
After a quick look on enwiki anything in 2009+ should have them.

It should also be noted that the params field will always be empty for unprotections but should have data for protections and modifications.
The params can be seen set here https://github.com/wikimedia/mediawiki/blob/master/includes/page/WikiPage.php#L2597