Fix incorrect use of Title::newFromText(). That function lets the user choose the...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 14 Nov 2008 00:44:08 +0000 (00:44 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 14 Nov 2008 00:44:08 +0000 (00:44 +0000)
includes/specials/SpecialFilepath.php

index a2ba3e5..af80e2f 100644 (file)
@@ -9,7 +9,7 @@ function wfSpecialFilepath( $par ) {
 
        $file = isset( $par ) ? $par : $wgRequest->getText( 'file' );
 
-       $title = Title::newFromText( $file, NS_IMAGE );
+       $title = Title::makeTitleSafe( NS_IMAGE, $file );
 
        if ( ! $title instanceof Title || $title->getNamespace() != NS_IMAGE ) {
                $cform = new FilepathForm( $title );