Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7423647
ChangeStatusLogFormatter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ChangeStatusLogFormatter.php
View Options
<?php
namespace
MediaWiki\Extension\CentralAuth\LogFormatter
;
use
MediaWiki\Logging\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
)
{
// The following messages are generated here (see CentralAuthUser#adminLockHide):
// * centralauth-log-status-locked
// * centralauth-log-status-oversighted
// * centralauth-log-status-hidden
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'
;
}
/** @inheritDoc */
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
Sun, Nov 22, 06:43 (22 h, 49 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
56/22/c9dda05341f6a56318152d47e443
Default Alt Text
ChangeStatusLogFormatter.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment