37 private $loadBalancer;
40 private $commentStore;
43 private $userNameUtils;
46 private $userNamePrefixSearch;
52 private $commentFormatter;
72 parent::__construct(
'Listfiles' );
73 $this->repoGroup = $repoGroup;
74 $this->loadBalancer = $loadBalancer;
75 $this->commentStore = $commentStore;
76 $this->userNameUtils = $userNameUtils;
77 $this->userNamePrefixSearch = $userNamePrefixSearch;
78 $this->userCache = $userCache;
79 $this->commentFormatter = $commentFormatter;
88 $userName = (string)$par;
92 $userName = $this->
getRequest()->getText(
'user', $par ??
'' );
93 $search = $this->
getRequest()->getText(
'ilsearch',
'' );
94 $showAll = $this->
getRequest()->getBool(
'ilshowall',
false );
97 $sanitizedUserName = $this->userNameUtils->getCanonical( $userName, UserRigorOptions::RIGOR_NONE );
98 if ( $sanitizedUserName ) {
99 $userName = $sanitizedUserName;
103 $pageTitle = $this->
msg(
'listfiles_subpage', $userName );
105 $pageTitle = $this->
msg(
'listfiles' );
115 $this->userNameUtils,
116 $this->commentFormatter,
124 $out->setPageTitle( $pageTitle );
125 $out->addModuleStyles(
'mediawiki.special' );
127 $out->addParserOutputContent( $pager->getBodyOutput() );
129 $user = $pager->getRelevantUser();
131 $this->
getSkin()->setRelevantUser( $user );
134 $out->addParserOutputContent( $pager->getFullOutput() );
147 $search = $this->userNameUtils->getCanonical( $search );
153 return $this->userNamePrefixSearch
154 ->search( UserNamePrefixSearch::AUDIENCE_PUBLIC, $search, $limit, $offset );
Shortcut to construct an includable special page.
Prioritized list of file repositories.
__construct(RepoGroup $repoGroup, ILoadBalancer $loadBalancer, CommentStore $commentStore, UserNameUtils $userNameUtils, UserNamePrefixSearch $userNamePrefixSearch, UserCache $userCache, CommentFormatter $commentFormatter)
prefixSearchSubpages( $search, $limit, $offset)
Return an array of subpages beginning with $search that this special page will accept.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
execute( $par)
Default execute method Checks user permissions.
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
getSkin()
Shortcut to get the skin being used for this instance.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
including( $x=null)
Whether the special page is being evaluated via transclusion.