Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6079117
ProtectedVarsAccessLogFormatter.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
ProtectedVarsAccessLogFormatter.php
View Options
<?php
namespace
MediaWiki\Extension\AbuseFilter\LogFormatter
;
use
LogEntry
;
use
LogFormatter
;
use
MediaWiki\Extension\AbuseFilter\ProtectedVarsAccessLogger
;
use
MediaWiki\Linker\Linker
;
use
MediaWiki\Message\Message
;
use
MediaWiki\User\UserFactory
;
class
ProtectedVarsAccessLogFormatter
extends
LogFormatter
{
private
UserFactory
$userFactory
;
public
function
__construct
(
LogEntry
$entry
,
UserFactory
$userFactory
)
{
parent
::
__construct
(
$entry
);
$this
->
userFactory
=
$userFactory
;
}
/**
* @inheritDoc
*/
protected
function
getMessageParameters
()
{
$params
=
parent
::
getMessageParameters
();
// Replace temporary user page link with contributions page link.
// Don't use LogFormatter::makeUserLink, because that adds tools links.
if
(
$this
->
entry
->
getSubtype
()
===
ProtectedVarsAccessLogger
::
ACTION_VIEW_PROTECTED_VARIABLE_VALUE
)
{
$tempUserName
=
$this
->
entry
->
getTarget
()->
getText
();
$params
[
2
]
=
Message
::
rawParam
(
Linker
::
userLink
(
0
,
$this
->
userFactory
->
newUnsavedTempUser
(
$tempUserName
)
)
);
}
return
$params
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 5 2026, 10:26 (6 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7b/a6/2b898856eff698775215c90acb45
Default Alt Text
ProtectedVarsAccessLogFormatter.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment