Make it slightly easier for extensions to hook into page protection.
authorMatthias Mullie <git@mullie.eu>
Mon, 20 May 2013 19:18:21 +0000 (21:18 +0200)
committerMatthias Mullie <git@mullie.eu>
Mon, 26 Aug 2013 21:13:43 +0000 (14:13 -0700)
commit92859c59c3899c6126576d2b1b4f29e2d60c3803
tree059df9a94f387666f16199bb94a428544ff90308
parentf3b38123cbd8ac70dcdcbbd5489c588038fc317e
Make it slightly easier for extensions to hook into page protection.

Split parts of doUpdateRestrictions() into several more concise functions.
The biggest drawback is increasing $dbw->encodeExpiry() calls times 3. This is
not much of a problem given that's a very inexpensive function and it is only
called very few times ($limit holds 2 values in current codebase)

Added $reason to the ProtectionForm::save hook, so that other code hooking into
and adding their own settings into page protection form can also process the
reason for the protection change.

Change-Id: I879290ed83e4e47e9561d4c352fbd50c07d7e18a
RELEASE-NOTES-1.22
docs/hooks.txt
includes/ProtectionForm.php
includes/WikiPage.php