From: Kevin Israel Date: Tue, 23 Oct 2012 03:30:24 +0000 (-0400) Subject: (bug 41292) Fix "containing..." search option X-Git-Tag: 1.31.0-rc.0~21906^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=2d55873310f4d9cefc6aabb694ba898adc4f55a7;p=lhc%2Fweb%2Fwiklou.git (bug 41292) Fix "containing..." search option Line 132 of jquery.js checks '' against rsingleTag. The 'type="hidden"' part causes the HTML to no longer match the regex, so jQuery fails to add the braced attributes. The "val: '1'" part was likely wrong anyway; the correct attribute name is "value". The bug causes the absence of the fulltext=1 query string argument, which leaves the title near-match logic enabled even when the user tries to override it. This commit fixes the problem by just putting all the attributes inside the HTML string. Change-Id: Ibcc56f64967e55740c10fdca30c525d4afc8fb25 --- diff --git a/resources/mediawiki/mediawiki.searchSuggest.js b/resources/mediawiki/mediawiki.searchSuggest.js index ca719ab8b6..8bcece18fa 100644 --- a/resources/mediawiki/mediawiki.searchSuggest.js +++ b/resources/mediawiki/mediawiki.searchSuggest.js @@ -134,10 +134,7 @@ }, select: function ( $input ) { $input.closest( 'form' ).append( - $( '', { - name: 'fulltext', - val: '1' - }) + $( '' ) ); $input.closest( 'form' ).submit(); } @@ -155,4 +152,4 @@ } ); -}( mediaWiki, jQuery ) ); \ No newline at end of file +}( mediaWiki, jQuery ) );