From 94941288b9032165eb9f754e4fca8f7bee6b4bb9 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 15 Oct 2016 17:01:15 -0700 Subject: [PATCH] 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 --- includes/specials/SpecialBooksources.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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' ) -- 2.20.1