From d6709386bfee2c20231e6bb543fc46659aed54b1 Mon Sep 17 00:00:00 2001 From: Eddie Greiner-Petter Date: Sat, 4 Mar 2017 01:27:51 +0100 Subject: [PATCH] Remove redundant input from search form A hidden input 'profile' gets added within the search form widget no matter what profile is loaded at the moment. This is done in shortDialogHtml along with a few other hidden fields. The same hidden field is added a second time in optionsHtml if the profile 'advanced' is run. Remove this redundance. Bug: T158869 Change-Id: I3be598702dbe9fa2cfe0fdd6c23fe6d88477626d --- includes/widget/search/SearchFormWidget.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/widget/search/SearchFormWidget.php b/includes/widget/search/SearchFormWidget.php index b8d415f695..a7407a062f 100644 --- a/includes/widget/search/SearchFormWidget.php +++ b/includes/widget/search/SearchFormWidget.php @@ -206,16 +206,13 @@ class SearchFormWidget { */ protected function optionsHtml( $term, $isPowerSearch, $profile ) { $html = ''; - $opts = [ - 'profile' => $profile, - ]; if ( $isPowerSearch ) { - $html .= $this->powerSearchBox( $term, $opts ); + $html .= $this->powerSearchBox( $term, [] ); } else { $form = ''; Hooks::run( 'SpecialSearchProfileForm', [ - $this->specialSearch, &$form, $profile, $term, $opts + $this->specialSearch, &$form, $profile, $term, [] ] ); $html .= $form; } -- 2.20.1