Some cleanup to EditPage:
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 4 Nov 2011 18:35:25 +0000 (18:35 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 4 Nov 2011 18:35:25 +0000 (18:35 +0000)
commitd83c2a431c2ac478ae4c19b05eb49e7c296b3cc9
tree3e597a2efa4965fc7563fa679cb200e5ef83e18e
parent6f74142d46505e58d01cded621a83c0c24ce5a35
Some cleanup to EditPage:
* Added displayPermissionsError() to show the permissions error page with the content if there's content to show or it will throw an normal exception if there's nothing to display; this restores a functionnality lost at some point and added new message 'viewyourtext' that is displayed when the user made changes to the content (e.g. when the block happens while the user is editing the page)
* Marked EditPage::readOnlyPage() as deprecated since displayPermissionsError() is now used. This also means that OutputPage::readOnlyPage() is no longer used to display such error pages (but still have to keep that functionnality since it's used by extensions, same for EditPage::readOnlyPage(), *sigh*)
* Removed blockedPage()'s display of content since it's nearly never called (a blocked user would trigger the path mentionned above, not the check in internalAttemptSave()) and also removed 'blockedoriginalsource' and 'blockededitsource' messages that are no longer used
* Use OutputPage::prepareErrorPage() to prepare error pages instead of doing all that stuff directly
* Moved noCreatePermission() near other error-related functions
* Throw an exception directly in attemptSave() instead of calling deprecated methods and marked noCreatePermission() and blockedPage() as deprecated
includes/EditPage.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc