Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1426908
AbuseFilterRightsLogFormatter.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
AbuseFilterRightsLogFormatter.php
View Options
<?php
namespace
MediaWiki\Extension\AbuseFilter\LogFormatter
;
use
LogFormatter
;
class
AbuseFilterRightsLogFormatter
extends
LogFormatter
{
/**
* This method is identical to the parent, but it's redeclared to give grep a chance
* to find the messages.
* @inheritDoc
*/
protected
function
getMessageKey
()
{
$subtype
=
$this
->
entry
->
getSubtype
();
// Messages that can be used here:
// * logentry-rights-blockautopromote
// * logentry-rights-restoreautopromote
return
"logentry-rights-$subtype"
;
}
/**
* @inheritDoc
*/
protected
function
extractParameters
()
{
$ret
=
[];
$ret
[
3
]
=
$this
->
entry
->
getTarget
()->
getText
();
if
(
$this
->
entry
->
getSubtype
()
===
'blockautopromote'
)
{
$parameters
=
$this
->
entry
->
getParameters
();
$duration
=
$parameters
[
'7::duration'
];
$ret
[
4
]
=
$this
->
context
->
getLanguage
()->
formatDuration
(
$duration
);
}
return
$ret
;
}
/**
* @inheritDoc
*/
protected
function
getMessageParameters
()
{
$params
=
parent
::
getMessageParameters
();
// remove "User:" prefix
$params
[
2
]
=
$this
->
formatParameterValue
(
'user-link'
,
$this
->
entry
->
getTarget
()->
getText
()
);
return
$params
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 13:53 (1 d, 16 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2b/6f/3142b236d0b5b92fdb2c2250a74c
Default Alt Text
AbuseFilterRightsLogFormatter.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment