Some cleanup to ProtectionForm:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 1 Nov 2011 15:45:52 +0000 (15:45 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 1 Nov 2011 15:45:52 +0000 (15:45 +0000)
commit41e944bac2f3d11caa3105499fc9bbbb8966a3a7
tree457bc2699b00ab7c8c2440d7d64398b991e6da35
parent2d64dcd9f95b25ab4be50d291c4d7e03054fd7f4
Some cleanup to ProtectionForm:
* When the user doesn't have permission to protect/unprotect the page, display a page with the title set to "View protection level for ...", then the permissions errors and the current protection levels. Except for the title, this was already the case for permissions errors, but when the database was read-only this was throwing an exception due to the change in OutputPage::readOnlyPage()
* Moved check for NS_MEDIAWIKI a level up, so that is it also catched on page save, and make the output in such case much more user friendly
* Changed edit token to be salted with array( 'protect', 'page name' ) (as for action=watch)
* Allow extensions to return false in ProtectionForm::save hook for consistency with other hooks and in that case fill the error message with 'hookaborted' if the extension does not provide an customised error message.
* Changed ProtectionForm::show() to accept an array of message name and its parameters in addition of a string with raw HTML and converted calls to use the new method. This also means that ProtectionForm::save can use this
* Removed the setSubtitle() call for the 'formerror' message in case of error since it's overriden by the "back link"
docs/hooks.txt
includes/ProtectionForm.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc