From: Bartosz DziewoƄski Date: Sat, 20 May 2017 22:59:59 +0000 (+0200) Subject: Don't fill in the skin's search box on Special:Search X-Git-Tag: 1.31.0-rc.0~3100^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=305fa92fc1f4b6f1afe987d4691ed2982efa04fa;p=lhc%2Fweb%2Fwiklou.git Don't fill in the skin's search box on Special:Search When viewing Special:Search, you usually see two search forms: the small one provided by the skin (present on all pages), and the large advanced search form generated by Special:Search. Previously, both of these forms would be prefilled with the text that was searched, which could lead to the user submitting the wrong form after changing advanced search options. After this change, the skin's search form will always start out empty. There's no way for this to affect pages other than Special:Search, since if the 'search' URL parameter is given, all requests are redirected to Special:Search anyway (see MediaWiki::parseTitle()). Bug: T106055 Change-Id: Ic6bb8af5383e7acfe4f823f563165cd60182753e --- diff --git a/includes/skins/BaseTemplate.php b/includes/skins/BaseTemplate.php index 5868904d20..0b7fc2f5d3 100644 --- a/includes/skins/BaseTemplate.php +++ b/includes/skins/BaseTemplate.php @@ -523,7 +523,6 @@ abstract class BaseTemplate extends QuickTemplate { 'type' => 'search', 'name' => 'search', 'placeholder' => wfMessage( 'searchsuggest-search' )->text(), - 'value' => $this->get( 'search', '' ), ]; $realAttrs = array_merge( $realAttrs, Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs ); return Html::element( 'input', $realAttrs );