Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431313
SpecialEditRecovery.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
SpecialEditRecovery.php
View Options
<?php
namespace
MediaWiki\Specials
;
use
MediaWiki\Html\Html
;
use
MediaWiki\SpecialPage\SpecialPage
;
use
MediaWiki\User\Options\UserOptionsLookup
;
/**
* @ingroup SpecialPage
*/
class
SpecialEditRecovery
extends
SpecialPage
{
/** @var UserOptionsLookup */
private
$userOptionsLookup
;
public
function
__construct
(
UserOptionsLookup
$userOptionsLookup
)
{
parent
::
__construct
(
'EditRecovery'
);
$this
->
userOptionsLookup
=
$userOptionsLookup
;
}
protected
function
getGroupName
()
{
return
'changes'
;
}
/**
* @param string|null $subPage
*/
public
function
execute
(
$subPage
)
{
parent
::
execute
(
$subPage
);
// Always add the help link, even for the error pages.
$this
->
addHelpLink
(
'Help:Edit_Recovery'
);
// Check that the user preference is enabled (the user is not necessarily logged in).
if
(
!
$this
->
userOptionsLookup
->
getOption
(
$this
->
getUser
(),
'editrecovery'
)
)
{
if
(
!
$this
->
getUser
()->
isNamed
()
)
{
// Pref is not enabled, and they aren't logged in.
$this
->
getOutput
()->
showErrorPage
(
'editrecovery'
,
'edit-recovery-special-user-unnamed'
);
}
else
{
// Pref is not enabled, but they are logged in so can enable it themselves.
$this
->
getOutput
()->
showErrorPage
(
'editrecovery'
,
'edit-recovery-special-user-not-enabled'
);
}
return
;
}
$this
->
getOutput
()->
addModuleStyles
(
'mediawiki.special.editrecovery.styles'
);
$this
->
getOutput
()->
addModules
(
'mediawiki.special.editrecovery'
);
$noJs
=
Html
::
element
(
'span'
,
[
'class'
=>
'error mw-EditRecovery-special-nojs-notice'
],
$this
->
msg
(
'edit-recovery-nojs-placeholder'
)
);
$placeholder
=
Html
::
rawElement
(
'div'
,
[
'class'
=>
'mw-EditRecovery-special'
],
$noJs
);
$this
->
getOutput
()->
addHTML
(
$placeholder
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 20:19 (23 h, 37 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
61/49/94109556cd1d7b638ae41bb27616
Default Alt Text
SpecialEditRecovery.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment