(bug 17972) Special:FileDuplicateSearch form now works correctly on wikis that don...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 14 Mar 2009 19:52:10 +0000 (19:52 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 14 Mar 2009 19:52:10 +0000 (19:52 +0000)
RELEASE-NOTES
includes/specials/SpecialFileDuplicateSearch.php

index 61c5f59..b705d77 100644 (file)
@@ -265,6 +265,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Special:Export doesn't use raw SQL queries anymore
 * (bug 14771) Thumbnail links to individual DjVu pages have two no longer have
   two "page" parameters
+* (bug 17972) Special:FileDuplicateSearch form now works correctly on wikis that
+  don't use PathInfo or short urls
 
 
 == API changes in 1.15 ==
index 49a218c..4fde0a6 100644 (file)
@@ -64,7 +64,7 @@ class FileDuplicateSearchPage extends QueryPage {
  * Output the HTML search form, and constructs the FileDuplicateSearch object.
  */
 function wfSpecialFileDuplicateSearch( $par = null ) {
-       global $wgRequest, $wgTitle, $wgOut, $wgLang, $wgContLang;
+       global $wgRequest, $wgOut, $wgLang, $wgContLang, $wgScript;
 
        $hash = '';
        $filename =  isset( $par ) ?  $par : $wgRequest->getText( 'filename' );
@@ -85,7 +85,8 @@ function wfSpecialFileDuplicateSearch( $par = null ) {
 
        # Create the input form
        $wgOut->addHTML(
-               Xml::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgTitle->getLocalUrl() ) ) .
+               Xml::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) .
+               Xml::hidden( 'title', SpecialPage::getTitleFor( 'FileDuplicateSearch' )->getPrefixedDbKey() ) .
                Xml::openElement( 'fieldset' ) .
                Xml::element( 'legend', null, wfMsg( 'fileduplicatesearch-legend' ) ) .
                Xml::inputLabel( wfMsg( 'fileduplicatesearch-filename' ), 'filename', 'filename', 50, $filename ) . ' ' .