Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1430753
ChangeStatusLogFormatter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
983 B
Referenced Files
None
Subscribers
None
ChangeStatusLogFormatter.php
View Options
<?php
namespace
MediaWiki\Extension\CentralAuth\LogFormatter
;
use
LogFormatter
;
/**
* Handles the following log types:
* - globalauth/setstatus
* - suppress/setstatus
*/
class
ChangeStatusLogFormatter
extends
LogFormatter
{
private
function
formatStatuses
(
array
$array
):
string
{
if
(
$array
!==
[]
)
{
$values
=
array_map
(
function
(
$key
)
{
return
$this
->
msg
(
'centralauth-log-status-'
.
$key
)->
text
();
},
$array
);
return
$this
->
formatParameterValue
(
'list'
,
$values
);
}
return
$this
->
msg
(
'centralauth-log-status-none'
)->
text
();
}
/** @inheritDoc */
protected
function
getMessageKey
()
{
return
'logentry-globalauth-setstatus'
;
}
protected
function
extractParameters
()
{
if
(
$this
->
entry
->
isLegacy
()
)
{
return
parent
::
extractParameters
();
}
[
'added'
=>
$added
,
'removed'
=>
$removed
]
=
$this
->
entry
->
getParameters
();
return
[
3
=>
$this
->
formatStatuses
(
$added
),
4
=>
$this
->
formatStatuses
(
$removed
),
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 19:30 (4 h, 4 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
0b/fa/b84adb7a395658aeae8d46f147aa
Default Alt Text
ChangeStatusLogFormatter.php (983 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment