r45269 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45268‎ | r45269 | r45270 >
Date:00:55, 1 January 2009
Author:rainman
Status:ok
Tags:
Comment:
(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.
Modified paths:
  • /trunk/extensions/InputBox/InputBox.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/InputBox/InputBox.classes.php
@@ -48,7 +48,9 @@
4949 case 'commenttitle':
5050 return $this->getCommentForm();
5151 case 'search':
52 - return $this->getSearchForm();
 52+ return $this->getSearchForm('search');
 53+ case 'fulltext':
 54+ return $this->getSearchForm('fulltext');
5355 case 'search2':
5456 return $this->getSearchForm2();
5557 default:
@@ -67,8 +69,9 @@
6870
6971 /**
7072 * Generate search form
 73+ * @param $type
7174 */
72 - public function getSearchForm() {
 75+ public function getSearchForm( $type ) {
7376 global $wgContLang;
7477
7578 // Use button label fallbacks
@@ -153,7 +156,7 @@
154157
155158 // Line break
156159 $htmlOut .= $this->mBR;
157 - } else {
 160+ } else if( $type == 'search') {
158161 // Go button
159162 $htmlOut .= Xml::element( 'input',
160163 array(

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45213(bug 5552) add a fulltext-only search mode to inputboxrainman02:53, 31 December 2008
r45261Revert r45213 "(bug 5552) add a fulltext-only search mode to inputbox"...brion22:18, 31 December 2008

Status & tagging log