Allow filenames to be specified in a <gallery> with the File:, Image: or media: omitt...
authorDaniel Friesen <dantman@users.mediawiki.org>
Wed, 5 Jan 2011 06:16:13 +0000 (06:16 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Wed, 5 Jan 2011 06:16:13 +0000 (06:16 +0000)
includes/parser/Parser.php

index 3061a2d..0ef79c9 100644 (file)
@@ -4526,7 +4526,7 @@ class Parser {
                        if ( strpos( $matches[0], '%' ) !== false ) {
                                $matches[1] = rawurldecode( $matches[1] );
                        }
-                       $tp = Title::newFromText( $matches[1] );
+                       $tp = Title::newFromText( $matches[1], NS_FILE );
                        $nt =& $tp;
                        if ( is_null( $nt ) ) {
                                # Bogus title. Ignore these so we don't bomb out later.