Last modified: 2011-12-14 17:37:36 UTC
As of r40713, log entries for protections store some sort of protection summary like [edit=autoconfirmed] (expires 13:04, 4 October 2008 (UTC)) [move=sysop] (indefinite) in log_params, along with a flag telling whether cascading protection was enabled. Instead of storing this as one blob of formatted text, it would be cleaner and more API-friendly (more about this below) to store each of the pieces in a separate element.
So instead of $paramArray = array('[edit=autoconfirmed] (expires 13:04, 4 October 2008 (UTC)) [move=sysop] (indefinite)', 'cascade') I'd like to see $paramArray = array('edit', 'autoconfirmed', '20081004130400', 'move', 'sysop', 'infinity', 'cascade')
As to the API-friendliness: the current format makes it hard to extract protection data from list=logevents in a reliable way (currently, the only way is to parse the string, but that's not very future-proof). It'd be nice to be able to present this data in a decent format.
Assigning to Aaron as he did the log_params change.
This was actually due to r40770
Adding a bunch of keywords to the summary so can find this bug again. :)
Bug 29021 is an example of the difficulties this causes; we got a report of a page on he.wikipedia.org that had mysteriously lost part of its protection settings... after some while of various people poking at it, we finally realized that the log line actually listed an expiration date for the part that had turned off .... but the date was listed in Hebrew, making it hard to find and extract from a mixed-language log line rendering by non-Hebrew speakers.
Bug 21127 also notes the confusion caused by hardcoding UTC time; for lots of European and some Asian languages, the vast majority of users have their timezone set to the local default and they're not used to having hardcoded UTC timestamps sitting around as often. Allowing it to be formatted into the local timezone along with all the other dates around it in the log view would improve consistency.
*** Bug 29646 has been marked as a duplicate of this bug. ***
This kind of clean-up should probably also be done for e.g. block log. The expiry time and other stuff is hardcoded in the params field.