MediaWiki  1.23.8
SpecialFilepath.php
Go to the documentation of this file.
1 <?php
31  function __construct() {
32  parent::__construct( 'Filepath' );
33  $this->mAllowedRedirectParams = array( 'width', 'height' );
34  }
35 
36  // implement by redirecting through Special:Redirect/file
37  function getRedirect( $par ) {
38  $file = $par ?: $this->getRequest()->getText( 'file' );
39 
40  return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . $file );
41  }
42 
43  protected function getGroupName() {
44  return 'media';
45  }
46 }
SpecialFilepath
A special page that redirects to the URL of a given file.
Definition: SpecialFilepath.php:30
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
SpecialFilepath\getRedirect
getRedirect( $par)
If the special page is a redirect, then get the Title object it redirects to.
Definition: SpecialFilepath.php:37
RedirectSpecialPage
Shortcut to construct a special page alias.
Definition: RedirectSpecialPage.php:29
SpecialPage\getSafeTitleFor
static getSafeTitleFor( $name, $subpage=false)
Get a localised Title object for a page name with a possibly unvalidated subpage.
Definition: SpecialPage.php:87
SpecialFilepath\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialFilepath.php:43
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialFilepath\__construct
__construct()
Definition: SpecialFilepath.php:31
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
$file
if(PHP_SAPI !='cli') $file
Definition: UtfNormalTest2.php:30