protected function getDidYouMeanHtml( SearchResultSet $textMatches ) {
# mirror Go/Search behavior of original request ..
$params = [ 'search' => $textMatches->getSuggestionQuery() ];
- if ( $this->fulltext != null ) {
+ if ( $this->fulltext === null ) {
+ $params['fulltext'] = 'Search';
+ } else {
$params['fulltext'] = $this->fulltext;
}
$stParams = array_merge( $params, $this->powerSearchOptions() );
// Search instead for '$orig'
$params = [ 'search' => $textMatches->getQueryAfterRewrite() ];
- if ( $this->fulltext != null ) {
+ if ( $this->fulltext === null ) {
+ $params['fulltext'] = 'Search';
+ } else {
$params['fulltext'] = $this->fulltext;
}
$stParams = array_merge( $params, $this->powerSearchOptions() );
$out .= "<ul class='mw-search-results'>\n";
while ( $result ) {
- $out .= $this->showHit( $result, $terms, ++$pos );
+ $out .= $this->showHit( $result, $terms, $pos++ );
$result = $matches->next();
}
$out .= "</ul>\n";
'autofocus' => trim( $term ) === '',
'value' => $term,
'dataLocation' => 'content',
+ 'infusable' => true,
] );
$layout = new OOUI\ActionFieldLayout( $searchWidget, new OOUI\ButtonInputWidget( [