Movatterモバイル変換


[0]ホーム

URL:


MediaWiki master
SpecialMycontributions.php
Go to the documentation of this file.
1<?php
8namespaceMediaWiki\Specials\Redirects;
9
10useMediaWiki\SpecialPage\RedirectSpecialPage;
11useMediaWiki\SpecialPage\SpecialPage;
12useMediaWiki\User\TempUser\TempUserConfig;
13
19classSpecialMycontributionsextendsRedirectSpecialPage {
20
21privateTempUserConfig $tempUserConfig;
22
23publicfunction__construct(TempUserConfig $tempUserConfig ) {
24 parent::__construct('Mycontributions' );
25
26 $this->tempUserConfig = $tempUserConfig;
27
28 $this->mAllowedRedirectParams = ['limit','namespace','tagfilter',
29'offset','dir','year','month','feed','deletedOnly',
30'nsInvert','associated','newOnly','topOnly','start','end',
31'returnto' ];
32 }
33
35publicfunctionexecute( $subpage ) {
36// Redirect to login for anon users when temp accounts are enabled.
37if ( $this->tempUserConfig->isEnabled() && $this->getUser()->isAnon() ) {
38 $this->requireLogin();
39 }
40 parent::execute( $subpage );
41 }
42
44publicfunctiongetRedirect( $subpage ) {
45if ( $this->tempUserConfig->isEnabled() && $this->getUser()->isAnon() ) {
46returnfalse;
47 }
48
49returnSpecialPage::getTitleFor('Contributions', $this->getUser()->getName() );
50 }
51
59returntrue;
60 }
61}
66class_alias( SpecialMycontributions::class,'SpecialMycontributions' );
MediaWiki\SpecialPage\RedirectSpecialPage
Shortcut to construct a special page alias.
DefinitionRedirectSpecialPage.php:19
MediaWiki\SpecialPage\SpecialPage
Parent class for all special pages.
DefinitionSpecialPage.php:51
MediaWiki\SpecialPage\SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...
DefinitionSpecialPage.php:139
MediaWiki\SpecialPage\SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
DefinitionSpecialPage.php:884
MediaWiki\SpecialPage\SpecialPage\requireLogin
requireLogin( $reasonMsg='exception-nologin-text', $titleMsg='exception-nologin')
If the user is not logged in, throws UserNotLoggedIn error.
DefinitionSpecialPage.php:419
MediaWiki\SpecialPage\SpecialPage\getName
getName()
Get the canonical, unlocalized name of this special page without namespace.
DefinitionSpecialPage.php:211
MediaWiki\Specials\Redirects\SpecialMycontributions
Redirect to Special:Contributions for the current user's name or IP.
DefinitionSpecialMycontributions.php:19
MediaWiki\Specials\Redirects\SpecialMycontributions\__construct
__construct(TempUserConfig $tempUserConfig)
DefinitionSpecialMycontributions.php:23
MediaWiki\Specials\Redirects\SpecialMycontributions\personallyIdentifiableTarget
personallyIdentifiableTarget()
Target identifies a specific User.
DefinitionSpecialMycontributions.php:58
MediaWiki\Specials\Redirects\SpecialMycontributions\execute
execute( $subpage)
to override
DefinitionSpecialMycontributions.php:35
MediaWiki\Specials\Redirects\SpecialMycontributions\getRedirect
getRedirect( $subpage)
If the special page is a redirect, then get the Title object it redirects to.False otherwise....
DefinitionSpecialMycontributions.php:44
MediaWiki\User\TempUser\TempUserConfig
Interface for temporary user creation config and name matching.
DefinitionTempUserConfig.php:18
MediaWiki\Specials\Redirects
DefinitionSpecialAllMyUploads.php:7

[8]ページ先頭

©2009-2025 Movatter.jp