Revision: 43471
Author:   tstarling
Date:     2008-11-14 00:44:08 +0000 (Fri, 14 Nov 2008)

Log Message:
-----------
Fix incorrect use of Title::newFromText(). That function lets the user choose 
the namespace using a title with colons, to force the namespace you must use 
Title::makeTitleSafe(). Images are always in the image namespace.

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialFilepath.php

Modified: trunk/phase3/includes/specials/SpecialFilepath.php
===================================================================
--- trunk/phase3/includes/specials/SpecialFilepath.php  2008-11-14 00:30:34 UTC 
(rev 43470)
+++ trunk/phase3/includes/specials/SpecialFilepath.php  2008-11-14 00:44:08 UTC 
(rev 43471)
@@ -9,7 +9,7 @@
 
        $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 );



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to