MediaWiki
REL1_31
SpecialFilepath.php
Go to the documentation of this file.
1
<?php
29
class
SpecialFilepath
extends
RedirectSpecialPage
{
30
public
function
__construct
() {
31
parent::__construct(
'Filepath'
);
32
$this->mAllowedRedirectParams = [
'width'
,
'height'
];
33
}
34
41
public
function
getRedirect
( $par ) {
42
$file = $par ?: $this->
getRequest
()->getText(
'file'
);
43
44
if
( $file ) {
45
$argument =
"file/$file"
;
46
}
else
{
47
$argument =
'file'
;
48
}
49
return
SpecialPage::getSafeTitleFor
(
'Redirect'
, $argument );
50
}
51
52
protected
function
getGroupName
() {
53
return
'media'
;
54
}
55
}
RedirectSpecialPage
Shortcut to construct a special page alias.
Definition
RedirectSpecialPage.php:29
SpecialFilepath
A special page that redirects to the URL of a given file.
Definition
SpecialFilepath.php:29
SpecialFilepath\__construct
__construct()
Definition
SpecialFilepath.php:30
SpecialFilepath\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition
SpecialFilepath.php:52
SpecialFilepath\getRedirect
getRedirect( $par)
Implement by redirecting through Special:Redirect/file.
Definition
SpecialFilepath.php:41
SpecialPage\getSafeTitleFor
static getSafeTitleFor( $name, $subpage=false)
Get a localised Title object for a page name with a possibly unvalidated subpage.
Definition
SpecialPage.php:110
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition
SpecialPage.php:712
includes
specials
SpecialFilepath.php
Generated on Mon Nov 25 2024 15:35:26 for MediaWiki by
1.10.0