Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7442200
DisableForm.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
DisableForm.php
View Options
<?php
namespace
MediaWiki\Extension\OATHAuth\HTMLForm
;
use
MediaWiki\Message\Message
;
class
DisableForm
extends
OATHAuthOOUIHTMLForm
{
/** @inheritDoc */
public
function
onSuccess
()
{
$this
->
getOutput
()->
addWikiMsg
(
'oathauth-disabledoath'
);
}
/** @inheritDoc */
protected
function
getDescriptors
()
{
$this
->
setSubmitTextMsg
(
'oathauth-disable-generic'
);
$this
->
setSubmitDestructive
();
$disableWarning
=
$this
->
msg
(
'oathauth-disable-method-warning'
,
$this
->
module
->
getDisplayName
()
)->
parseAsBlock
();
$customMessage
=
$this
->
module
->
getDisableWarningMessage
();
if
(
$customMessage
instanceof
Message
)
{
$disableWarning
.=
$customMessage
->
parseAsBlock
();
}
return
[
'warning'
=>
[
'type'
=>
'info'
,
'raw'
=>
true
,
'default'
=>
$disableWarning
]
];
}
/** @inheritDoc */
public
function
onSubmit
(
array
$formData
)
{
$this
->
oathRepo
->
removeAllOfType
(
$this
->
oathUser
,
$this
->
module
->
getName
(),
$this
->
getRequest
()->
getIP
(),
true
);
return
true
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 16:25 (16 h, 37 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9c/1c/9c076d381364bf0b3d4141452720
Default Alt Text
DisableForm.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment