(bug 5552) add a fulltext-only search mode to inputbox

Reuse getSearchForm() for both 'search' and 'fulltext' type, IMO it should also be used for 'search2' (exact-match only), but since 'search2' is kindof strange and ignores some params (like 'break') for which I'm not sure if it's bug or feature, leaving 'search2' as separate function.
This commit is contained in:
Robert Stojnić 2009-01-01 00:55:18 +00:00
parent b3fb8aaab0
commit ecbb8ed97c

View file

@ -48,7 +48,9 @@ class InputBox {
case 'commenttitle':
return $this->getCommentForm();
case 'search':
return $this->getSearchForm();
return $this->getSearchForm('search');
case 'fulltext':
return $this->getSearchForm('fulltext');
case 'search2':
return $this->getSearchForm2();
default:
@ -67,8 +69,9 @@ class InputBox {
/**
* Generate search form
* @param $type
*/
public function getSearchForm() {
public function getSearchForm( $type ) {
global $wgContLang;
// Use button label fallbacks
@ -153,7 +156,7 @@ class InputBox {
// Line break
$htmlOut .= $this->mBR;
} else {
} else if( $type == 'search') {
// Go button
$htmlOut .= Xml::element( 'input',
array(