MediaWiki  1.23.2
Go to the documentation of this file.
1 <?php
31  public function __construct( $permission, $errors = array() ) {
34  $this->permission = $permission;
36  if ( !count( $errors ) ) {
37  $groups = array_map(
38  array( 'User', 'makeGroupLinkWiki' ),
39  User::getGroupsWithPermission( $this->permission )
40  );
42  if ( $groups ) {
43  $errors[] = array( 'badaccess-groups', $wgLang->commaList( $groups ), count( $groups ) );
44  } else {
45  $errors[] = array( 'badaccess-group0' );
46  }
47  }
49  $this->errors = $errors;
50  }
52  public function report() {
53  global $wgOut;
55  $wgOut->showPermissionsErrorPage( $this->errors, $this->permission );
56  $wgOut->output();
57  }
58 }
__construct( $permission, $errors=array())
Definition: PermissionsError.php:31
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
Show an error when a user tries to do something they do not have the necessary permissions for.
Definition: PermissionsError.php:28
Definition: Setup.php:562
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
if the prop value should be in the metadata multi language array can modify can modify indexed by page_id indexed by prefixed DB keys can modify can modify can modify this should be populated with an alert message to that effect to be fed to an HTMLForm object and populate $result with the reason in the form of error messages should be plain text with no special etc to show that they re errors
Definition: hooks.txt:1318
Definition: PermissionsError.php:29
Definition: PermissionsError.php:29
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
Definition: design.txt:56
An error page which can definitely be safely rendered using the OutputPage.
Definition: ErrorPageError.php:27
Output a report about the exception and takes care of formatting.
Definition: PermissionsError.php:52
static getGroupsWithPermission( $role)
Get all the groups who have a given permission.
Definition: User.php:4123