MediaWiki
master
Toggle main menu visibility
SpecialAuthenticationPopupSuccess.php
Go to the documentation of this file.
1
<?php
9
10
namespace
MediaWiki\Specials;
11
12
use MediaWiki\Skin\SkinFactory;
13
use MediaWiki\SpecialPage\UnlistedSpecialPage;
14
21
class
SpecialAuthenticationPopupSuccess
extends
UnlistedSpecialPage
{
22
public
function
__construct
(
23
private
readonly
SkinFactory
$skinFactory
24
) {
25
parent::__construct(
'AuthenticationPopupSuccess'
);
26
}
27
29
public
function
execute
( $par ) {
30
if
( $this->
getRequest
()->getRawVal(
'display'
) ===
'popup'
) {
31
// Replace the default skin with a "micro-skin" that omits most of the interface. (T362706)
32
// In the future, we might allow normal skins to serve this mode too, if they advise that
33
// they support it by setting a skin option, so that colors and fonts could stay consistent.
34
$this->
getContext
()->setSkin( $this->skinFactory->makeSkin(
'authentication-popup'
) );
35
}
36
37
$this->
setHeaders
();
38
39
$out = $this->
getOutput
();
40
$out->addModules(
'mediawiki.authenticationPopup.success'
);
41
42
if
( $this->
getUser
()->isNamed() ) {
43
$out->setPageTitleMsg( $this->
msg
(
'loginsuccesstitle'
) );
44
$out->addWikiMsg(
'loginsuccess'
,
wfEscapeWikiText
( $this->
getUser
()->
getName
() ) );
45
}
else
{
46
$out->setPageTitleMsg( $this->
msg
(
'exception-nologin'
) );
47
$out->addWikiMsg(
'exception-nologin-text'
);
48
}
49
$out->addWikiMsg(
'userlogin-authpopup-closeme'
);
50
}
51
}
wfEscapeWikiText
wfEscapeWikiText( $input)
Escapes the given text so that it may be output using addWikiText() without any linking,...
Definition
GlobalFunctions.php:784
MediaWiki\Skin\SkinFactory
Factory class to create Skin objects.
Definition
SkinFactory.php:20
MediaWiki\SpecialPage\SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition
SpecialPage.php:664
MediaWiki\SpecialPage\SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
Definition
SpecialPage.php:870
MediaWiki\SpecialPage\SpecialPage\getContext
getContext()
Gets the context this SpecialPage is executed in.
Definition
SpecialPage.php:834
MediaWiki\SpecialPage\SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition
SpecialPage.php:850
MediaWiki\SpecialPage\SpecialPage\msg
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
Definition
SpecialPage.php:971
MediaWiki\SpecialPage\SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition
SpecialPage.php:860
MediaWiki\SpecialPage\SpecialPage\getName
getName()
Get the canonical, unlocalized name of this special page without namespace.
Definition
SpecialPage.php:192
MediaWiki\SpecialPage\UnlistedSpecialPage
Shortcut to construct a special page which is unlisted by default.
Definition
UnlistedSpecialPage.php:19
MediaWiki\Specials\SpecialAuthenticationPopupSuccess
A page for the 'mediawiki.authenticationPopup' module.
Definition
SpecialAuthenticationPopupSuccess.php:21
MediaWiki\Specials\SpecialAuthenticationPopupSuccess\execute
execute( $par)
Default execute method Checks user permissions.This must be overridden by subclasses; it will be made...
Definition
SpecialAuthenticationPopupSuccess.php:29
MediaWiki\Specials\SpecialAuthenticationPopupSuccess\__construct
__construct(private readonly SkinFactory $skinFactory)
Definition
SpecialAuthenticationPopupSuccess.php:22
includes
Specials
SpecialAuthenticationPopupSuccess.php
Generated on
for MediaWiki by
1.18.0