From: John Du Hart Date: Tue, 23 Aug 2011 19:56:15 +0000 (+0000) Subject: (bug 30335) Fix for HTMLForms using GET breaking when non-friendly URLs are used X-Git-Tag: 1.31.0-rc.0~28117 X-Git-Url: http://git.cyclocoop.org//%27http:/code.google.com/p/ie7-js//%27?a=commitdiff_plain;h=d17077d6fc616b0b4b58784d22bcb15ae11d17c5;p=lhc%2Fweb%2Fwiklou.git (bug 30335) Fix for HTMLForms using GET breaking when non-friendly URLs are used --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 07babd54a5..87e66c19fb 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -68,6 +68,8 @@ production. * (bug 11374) Improved diff readability for colorblind people. * (bug 26486) ResourceLoader modules with paths to nonexistent files cause PHP warnings/notices to be thrown. +* (bug 30335) Fix for HTMLForms using GET breaking when non-friendly URLs are + used === API changes in 1.19 === * (bug 19838) siprop=interwikimap can now use the interwiki cache. diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index e9eacccd46..e2ca1277a1 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -430,12 +430,18 @@ class HTMLForm { * @return String HTML. */ function getHiddenFields() { + global $wgUsePathInfo; + $html = ''; if( $this->getMethod() == 'post' ){ $html .= Html::hidden( 'wpEditToken', $this->getUser()->editToken(), array( 'id' => 'wpEditToken' ) ) . "\n"; $html .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; } + if ( !$wgUsePathInfo && $this->getMethod() == 'get' ) { + $html .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; + } + foreach ( $this->mHiddenFields as $data ) { list( $value, $attribs ) = $data; $html .= Html::hidden( $attribs['name'], $value, $attribs ) . "\n";