Make "Special:FilePath?file=.." work again
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 23 Jul 2013 09:34:25 +0000 (11:34 +0200)
committerParent5446 <tylerromeo@gmail.com>
Tue, 23 Jul 2013 11:56:07 +0000 (11:56 +0000)
bug: 51542
Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3

includes/specials/SpecialFilepath.php

index 57e552b..e7ced52 100644 (file)
@@ -35,7 +35,8 @@ class SpecialFilepath extends RedirectSpecialPage {
 
        // implement by redirecting through Special:Redirect/file
        function getRedirect( $par ) {
-               return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . $par );
+               $file = $par ?: $this->getRequest()->getText( 'file' );
+               return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . $file );
        }
 
        protected function getGroupName() {