Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6074278
ContentModelLogFormatter.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
ContentModelLogFormatter.php
View Options
<?php
use
MediaWiki\Content\ContentHandler
;
use
MediaWiki\SpecialPage\SpecialPage
;
class
ContentModelLogFormatter
extends
LogFormatter
{
protected
function
getMessageParameters
()
{
$lang
=
$this
->
context
->
getLanguage
();
$params
=
parent
::
getMessageParameters
();
$params
[
3
]
=
ContentHandler
::
getLocalizedName
(
$params
[
3
],
$lang
);
$params
[
4
]
=
ContentHandler
::
getLocalizedName
(
$params
[
4
],
$lang
);
return
$params
;
}
public
function
getActionLinks
()
{
if
(
$this
->
entry
->
isDeleted
(
LogPage
::
DELETED_ACTION
)
// Action is hidden
||
$this
->
entry
->
getSubtype
()
!==
'change'
||
!
$this
->
context
->
getAuthority
()->
isAllowed
(
'editcontentmodel'
)
)
{
return
''
;
}
$params
=
$this
->
extractParameters
();
$revert
=
$this
->
getLinkRenderer
()->
makeKnownLink
(
SpecialPage
::
getTitleFor
(
'ChangeContentModel'
),
$this
->
msg
(
'logentry-contentmodel-change-revertlink'
)->
text
(),
[],
[
'pagetitle'
=>
$this
->
entry
->
getTarget
()->
getPrefixedText
(),
'model'
=>
$params
[
3
],
'reason'
=>
$this
->
msg
(
'logentry-contentmodel-change-revert'
)->
inContentLanguage
()->
text
(),
]
);
return
$this
->
msg
(
'parentheses'
)->
rawParams
(
$revert
)->
escaped
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 5 2026, 08:23 (6 w, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
89/38/736fbb5eb32bab299c2877391522
Default Alt Text
ContentModelLogFormatter.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment