mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/InputBox
synced 2024-11-15 03:04:52 +00:00
(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:
parent
b3fb8aaab0
commit
ecbb8ed97c
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue