From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/exception/PermissionsError.php | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 includes/exception/PermissionsError.php (limited to 'includes/exception/PermissionsError.php') diff --git a/includes/exception/PermissionsError.php b/includes/exception/PermissionsError.php new file mode 100644 index 00000000..bfba7b27 --- /dev/null +++ b/includes/exception/PermissionsError.php @@ -0,0 +1,58 @@ +permission = $permission; + + if ( !count( $errors ) ) { + $groups = array_map( + array( 'User', 'makeGroupLinkWiki' ), + User::getGroupsWithPermission( $this->permission ) + ); + + if ( $groups ) { + $errors[] = array( 'badaccess-groups', $wgLang->commaList( $groups ), count( $groups ) ); + } else { + $errors[] = array( 'badaccess-group0' ); + } + } + + $this->errors = $errors; + } + + public function report() { + global $wgOut; + + $wgOut->showPermissionsErrorPage( $this->errors, $this->permission ); + $wgOut->output(); + } +} -- cgit v1.2.3-54-g00ecf