From: Kunal Mehta Date: Sun, 16 Oct 2016 00:01:15 +0000 (-0700) Subject: SpecialBooksources: Fix submitting the form from a subpage link X-Git-Tag: 1.31.0-rc.0~5096^2 X-Git-Url: http://git.cyclocoop.org//%22javascript:ModifierStyle%28%27%22.%24id.%22%27%29/%22?a=commitdiff_plain;h=94941288b9032165eb9f754e4fca8f7bee6b4bb9;p=lhc%2Fweb%2Fwiklou.git SpecialBooksources: Fix submitting the form from a subpage link Visiting Special:Booksources/.... and then trying to enter a new ISBN in the form field didn't work because the $par would take precedence over the query parameter. Removing the subpage from the HTMLForm context apparently fixes this. Change-Id: Ia007648e23beadcc017e117e59ce3df1b329dcdc --- diff --git a/includes/specials/SpecialBooksources.php b/includes/specials/SpecialBooksources.php index 2fef72520a..72e0b888fe 100644 --- a/includes/specials/SpecialBooksources.php +++ b/includes/specials/SpecialBooksources.php @@ -133,7 +133,9 @@ class SpecialBookSources extends SpecialPage { ], ]; - HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ) + $context = new DerivativeContext( $this->getContext() ); + $context->setTitle( $this->getPageTitle() ); + HTMLForm::factory( 'ooui', $formDescriptor, $context ) ->setWrapperLegendMsg( 'booksources-search-legend' ) ->setSubmitTextMsg( 'booksources-search' ) ->setMethod( 'get' )