Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5982663
GlobalUserMergeLogFormatter.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
GlobalUserMergeLogFormatter.php
View Options
<?php
namespace
MediaWiki\Extension\CentralAuth\LogFormatter
;
use
LogFormatter
;
use
MediaWiki\Message\Message
;
use
MediaWiki\SpecialPage\SpecialPage
;
/**
* Format the gblrename/merge log entries
*
* phan-taint-check gets very confused by $this->plaintext changing expected taint types everywhere,
* so manual annotations are needed. They should be correct for the non-plaintext mode (HTML output).
*/
class
GlobalUserMergeLogFormatter
extends
LogFormatter
{
protected
function
extractParameters
()
{
$lang
=
$this
->
context
->
getLanguage
();
$params
=
parent
::
extractParameters
();
$from
=
[];
foreach
(
explode
(
'|'
,
$params
[
3
]
)
as
$name
)
{
$from
[]
=
$this
->
getCentralAuthLink
(
$name
);
}
return
[
3
=>
Message
::
rawParam
(
$lang
->
commaList
(
$from
)
),
4
=>
Message
::
rawParam
(
$this
->
getCentralAuthLink
(
$params
[
4
]
)
),
];
}
/**
* @param string $name
* @param-taint $name none
* @return string wikitext or html
* @return-taint onlysafefor_html
*/
protected
function
getCentralAuthLink
(
$name
)
{
$title
=
SpecialPage
::
getTitleFor
(
'CentralAuth'
,
$name
);
if
(
$this
->
plaintext
)
{
return
$title
->
getPrefixedText
();
}
else
{
return
$this
->
getLinkRenderer
()->
makeKnownLink
(
$title
,
$name
);
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 22:28 (1 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ca/0d/e4d16dab85d0b2a015c75e5df655
Default Alt Text
GlobalUserMergeLogFormatter.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment