MediaWiki  REL1_24
SpecialFilepath.php
Go to the documentation of this file.
00001 <?php
00030 class SpecialFilepath extends RedirectSpecialPage {
00031     function __construct() {
00032         parent::__construct( 'Filepath' );
00033         $this->mAllowedRedirectParams = array( 'width', 'height' );
00034     }
00035 
00036     // implement by redirecting through Special:Redirect/file
00037     function getRedirect( $par ) {
00038         $file = $par ?: $this->getRequest()->getText( 'file' );
00039 
00040         if ( $file ) {
00041             $argument = "file/$file";
00042         } else {
00043             $argument = 'file';
00044         }
00045         return SpecialPage::getSafeTitleFor( 'Redirect', $argument );
00046     }
00047 
00048     protected function getGroupName() {
00049         return 'media';
00050     }
00051 }