* Made PermissionsError exception accept an optional second parameter for the descrip...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 2 Nov 2011 15:30:55 +0000 (15:30 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 2 Nov 2011 15:30:55 +0000 (15:30 +0000)
commitf2d0453f9dce404e3d9a6635a9b7aafad8592252
treec3baa21559e6114b4602a522044bd6727a468482
parentcdb26ec5b576f4fa1d6994b2a7f86fd06873efd6
* Made PermissionsError exception accept an optional second parameter for the description of the errors (as returned by Title::getUserPermissionsErrors())
* PermissionsError now calls OutputPage::showPermissionsErrorPage() to display the error (this is needed to make the item above work correctly)
* Removed the override of the HTML title in OutputPage::showPermissionsErrorPage() so that it shows "Permission errors - Sitename" instead of simply "Permission errors" for consistency with the other things
* Pass the error array returned by Title::getUserPermissionsErrors() to PermissionsError where available
* Converted direct calls to OutputPage::showPermissionsErrorPage() to throw an PermissionsError error instead
* Added 'action-rollback' message that will be displayed when accessing action=rollback without sufficient rights
* Changed getRestriction() in subclasses of Action to return null when they previously returned 'read' so that user rights can be check with Title::getUserPermissionsErrors()
* Reordered checks to do first user rights, then block (if needed) and finally read only (also if needed) so that users don't think the error is temporary when they both don't have right and the database is locked
19 files changed:
includes/Action.php
includes/Article.php
includes/Exception.php
includes/FileDeleteForm.php
includes/OutputPage.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/actions/MarkpatrolledAction.php
includes/actions/RawAction.php
includes/actions/RevertAction.php
includes/actions/RollbackAction.php
includes/actions/WatchAction.php
includes/specials/SpecialImport.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialUserrights.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc