MediaWiki 1.43.1
SpecialMyuploads.php
Go to the documentation of this file.
1<?php
22
27
34
35 private TempUserConfig $tempUserConfig;
36
40 public function __construct( TempUserConfig $tempUserConfig ) {
41 parent::__construct( 'Myuploads' );
42
43 $this->tempUserConfig = $tempUserConfig;
44 $this->mAllowedRedirectParams = [ 'limit', 'ilshowall', 'ilsearch' ];
45 }
46
51 public function getRedirect( $subpage ) {
52 // Redirect to login for anon users when temp accounts are enabled.
53 if ( $this->tempUserConfig->isEnabled() && $this->getUser()->isAnon() ) {
54 $this->requireLogin();
55 }
56
57 return SpecialPage::getTitleFor( 'Listfiles', $this->getUser()->getName() );
58 }
59
66 public function personallyIdentifiableTarget() {
67 return true;
68 }
69}
74class_alias( SpecialMyuploads::class, 'SpecialMyuploads' );
Shortcut to construct a special page alias.
Parent class for all special pages.
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,...
getUser()
Shortcut to get the User executing this instance.
requireLogin( $reasonMsg='exception-nologin-text', $titleMsg='exception-nologin')
If the user is not logged in, throws UserNotLoggedIn error.
getName()
Get the canonical, unlocalized name of this special page without namespace.
Redirect to Special:Listfiles for the current user's name or IP.
personallyIdentifiableTarget()
Target identifies a specific User.
__construct(TempUserConfig $tempUserConfig)
Represents a title within MediaWiki.
Definition Title.php:78
Interface for temporary user creation config and name matching.