summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialFilepath.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialFilepath.php')
-rw-r--r--includes/specials/SpecialFilepath.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/specials/SpecialFilepath.php b/includes/specials/SpecialFilepath.php
index a2ba3e57..4a724b1f 100644
--- a/includes/specials/SpecialFilepath.php
+++ b/includes/specials/SpecialFilepath.php
@@ -9,9 +9,9 @@ function wfSpecialFilepath( $par ) {
$file = isset( $par ) ? $par : $wgRequest->getText( 'file' );
- $title = Title::newFromText( $file, NS_IMAGE );
+ $title = Title::makeTitleSafe( NS_FILE, $file );
- if ( ! $title instanceof Title || $title->getNamespace() != NS_IMAGE ) {
+ if ( ! $title instanceof Title || $title->getNamespace() != NS_FILE ) {
$cform = new FilepathForm( $title );
$cform->execute();
} else {