(bug 23845) Special:ListFiles now uses correct file names without underscores
authorMatěj Grabovský <mgrabovsky@users.mediawiki.org>
Sun, 13 Jun 2010 13:08:57 +0000 (13:08 +0000)
committerMatěj Grabovský <mgrabovsky@users.mediawiki.org>
Sun, 13 Jun 2010 13:08:57 +0000 (13:08 +0000)
RELEASE-NOTES
includes/specials/SpecialListfiles.php

index 50312b3..69642c4 100644 (file)
@@ -192,6 +192,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 23797) Xml::input() now allows '0' for the value parameter
 * (bug 23747) Make sure that on History pages, the RevDel button is not
   accidently activated when hitting enter.
+* (bug 23845) Special:ListFiles now uses correct file names without underscores
 
 === API changes in 1.17 ===
 * (bug 22738) Allow filtering by action type on query=logevent.
index 09e61e7..bd1d0ae 100644 (file)
@@ -145,8 +145,8 @@ class ImageListPager extends TablePager {
                                static $imgfile = null;
                                if ( $imgfile === null ) $imgfile = wfMsg( 'imgfile' );
 
-                               $name = $this->mCurrentRow->img_name;
-                               $link = $this->getSkin()->linkKnown( Title::makeTitle( NS_FILE, $name ), htmlspecialchars( $value ) );
+                               $filePage = Title::makeTitle( NS_FILE, $value );
+                               $link = $this->getSkin()->linkKnown( $filePage, htmlspecialchars( $filePage->getText() ) );
                                $image = wfLocalFile( $value );
                                $url = $image->getURL();
                                $download = Xml::element('a', array( 'href' => $url ), $imgfile );