From df55e7a8619fe770b4b3f81fdd89e06e0a62b28c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 14 Mar 2009 19:52:10 +0000 Subject: [PATCH] (bug 17972) Special:FileDuplicateSearch form now works correctly on wikis that don't use PathInfo or short urls --- RELEASE-NOTES | 2 ++ includes/specials/SpecialFileDuplicateSearch.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 61c5f5938d..b705d77b38 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 49a218c8a1..4fde0a606f 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -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 ) . ' ' . -- 2.20.1