-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
A Chan wrote:
Our users prefer to have fulltext search behavior as
the default, rather than the "Go" button search behavior. So I've
customized our MediaWiki 1.4.5 instance to remove the "Go" button. (I removed
the <input> tag for the "Go" button in skin.php.)
Now the search behavior varies, depending on the browser. If I type a search term and
hit the 'enter' key:
Firefox - performs fulltext search, showing results page with matching page titles and
then matching article text
Internet Explorer - performs search as if 'Go' button was pressed, jumps to page
with matching title
Has anyone else seen this behavior, and how can I correct it?
I believe this is due to a difference in how the browsers submit forms
when you hit 'enter'.
Firefox submits the form as though you'd clicked the first submit button
in the form, so the 'fulltext' parameter (form item name of the 'Search'
submit button) gets included in the request.
IE doesn't trigger any of the form buttons in this case, so you just get
a direct submission... which we have defaulting to the 'go' mode with
redirects on exact-match.
This is a bit annoying as there are some cases where it doesn't do what
we want in IE.
As a workaround for now, you could hack wfSpecialSearch() in
SpecialSearch.php. It'll have a bit like this:
if( $wgRequest->getVal( 'fulltext' )
|| !is_null( $wgRequest->getVal( 'offset' ))
|| !is_null( $wgRequest->getVal( 'searchx' )) )
{
$searchPage->showResults( $search, 'search' );
} else {
$searchPage->goResult( $search );
}
trim out the check and just have it always call showResults():
$searchPage->showResults( $search, 'search' );
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkkh3AIACgkQwRnhpk1wk46i9wCfR6fwQ+5LtuljKBTVJdMCazE5
ZEgAn0NGVF8KmKvg3lhw5DVoedJFEat8
=m/Bt
-----END PGP SIGNATURE-----