Not quite duplicates, but I think Bug 10079 might handle this problem more completely. Aside from protection expiry removing old move-protection, it can also remove old semi-protection (suppose a contentious page has long been under semi, to deal with vandalism, and is temporarily given fullprot, to stop an edit war; should the vandals be let back in, when protection expires?).
Created attachment 5210
Adds an expiry input for each protection type, as noted, the database already supports this. $mRestrictionsExpiry in Title.php and $mExpiry in ProtectionForm are now arrays with the action as keys. If any extension uses these it could potentially break it.
The only outstanding problem is cascading protection. If one protection expires before the other, the page will be left with partial cascading protection (move-only cascading protection). I can think of a few possible solutions for this, not sure which is most desirable:
- Leave as is.
- Require all the expiration times to be the same when using cascading protection.
- Add a pr_cascade_expiry field to the page_restrictions table set to the shortest single expiry time, to have cascading protection expire when the first protection level expires.
- Only apply the cascading protection to the database row where pr_type = 'edit', and have the cascading protection functions loop over $wgRestrictionTypes when applying restrictions.
attachment 12650.patch ignored as obsolete