35 if ( !$this->plaintext ) {
39 if ( count( $parts ) === 2 ) {
44 strtr( $parts[0],
'_',
' ' ) .
50 if ( $titleLink !==
false ) {
56 return parent::makePageLink( $title, $parameters, $title ? $title->getText() : null );
60 $key = parent::getMessageKey();
71 $params = parent::getMessageParameters();
81 $userName = $this->entry->getTarget()->getText();
82 if ( !$this->plaintext && count( $oldGroups ) ) {
83 foreach ( $oldGroups as &$group ) {
87 if ( !$this->plaintext && count( $newGroups ) ) {
88 foreach ( $newGroups as &$group ) {
94 $allParams = $this->entry->getParameters();
96 if ( count( $oldGroups ) ) {
98 isset( $allParams[
'oldmetadata'] ) ? $allParams[
'oldmetadata'] : [] ) ];
100 $params[3] = $this->
msg(
'rightsnone' )->text();
102 if ( count( $newGroups ) ) {
106 isset( $allParams[
'newmetadata'] ) ? $allParams[
'newmetadata'] : [] ) ];
108 $params[4] = $this->
msg(
'rightsnone' )->text();
117 $uiLanguage = $this->context->getLanguage();
118 $uiUser = $this->context->getUser();
120 $tempList = $permList = [];
123 reset( $serializedUGMs );
124 while ( current( $groups ) ) {
125 $group = current( $groups );
127 if ( current( $serializedUGMs ) &&
128 isset( current( $serializedUGMs )[
'expiry'] ) &&
129 current( $serializedUGMs )[
'expiry']
132 $expiry = current( $serializedUGMs )[
'expiry'];
133 $expiryFormatted = $uiLanguage->userTimeAndDate( $expiry, $uiUser );
134 $expiryFormattedD = $uiLanguage->userDate( $expiry, $uiUser );
135 $expiryFormattedT = $uiLanguage->userTime( $expiry, $uiUser );
136 $tempList[] = $this->
msg(
'rightslogentry-temporary-group' )->params( $group,
137 $expiryFormatted, $expiryFormattedD, $expiryFormattedT )->parse();
140 $permList[] = $group;
144 next( $serializedUGMs );
149 return $uiLanguage->listToText( array_merge( $tempList, $permList ) );
159 '4::oldgroups' =>
'4:array:oldgroups',
160 '5::newgroups' =>
'5:array:newgroups',
162 foreach ( $map as $index => $key ) {
163 if ( isset(
$params[$index] ) ) {
173 if ( isset(
$params[
'4:array:oldgroups'] ) ) {
176 $oldmetadata =&
$params[
'oldmetadata'];
178 unset(
$params[
'oldmetadata'] );
179 $params[
'oldmetadata'] = array_map(
function ( $index ) use (
$params, $oldmetadata ) {
180 $result = [
'group' =>
$params[
'4:array:oldgroups'][$index] ];
181 if ( isset( $oldmetadata[$index] ) ) {
182 $result += $oldmetadata[$index];
185 $result[
'expiry'] : null );
188 }, array_keys(
$params[
'4:array:oldgroups'] ) );
191 if ( isset(
$params[
'5:array:newgroups'] ) ) {
194 $newmetadata =&
$params[
'newmetadata'];
196 unset(
$params[
'newmetadata'] );
197 $params[
'newmetadata'] = array_map(
function ( $index ) use (
$params, $newmetadata ) {
198 $result = [
'group' =>
$params[
'5:array:newgroups'][$index] ];
199 if ( isset( $newmetadata[$index] ) ) {
200 $result += $newmetadata[$index];
203 $result[
'expiry'] : null );
206 }, array_keys(
$params[
'5:array:newgroups'] ) );
213 $ret = parent::formatParametersForApi();
214 if ( isset(
$ret[
'oldgroups'] ) ) {
217 if ( isset(
$ret[
'newgroups'] ) ) {
220 if ( isset(
$ret[
'oldmetadata'] ) ) {
224 if ( isset(
$ret[
'newmetadata'] ) ) {
233 if ( $group ===
'' ) {
235 } elseif ( is_string( $group ) ) {
236 $group = array_map(
'trim', explode(
',', $group ) );
$wgUserrightsInterwikiDelimiter
Character used as a delimiter when testing for interwiki userrights (In Special:UserRights,...
static setArrayType(array &$arr, $type, $kvpKeyName=null)
Set the array data type.
static setIndexedTagName(array &$arr, $tag)
Set the tag name for numeric-keyed values in XML format.
static formatExpiry( $expiry, $infinity='infinity')
Format an expiry timestamp for API output.
Represents a title within MediaWiki.
static getGroupMemberName( $group, $username)
Gets the localized name for a member of a group, if it exists.
static foreignUserLink( $wikiID, $user, $text=null)
Convenience to get a link to a user page on a foreign wiki.
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 and the local content language as $wgContLang
namespace being checked & $result
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
getParameters()
Get the extra parameters stored for this message.