return;
}
global $wgInputEncoding;
- $wgOut->addHTML( wfMsg( 'searchdisabled' ) );
- $wgOut->addHTML(
+ $wgOut->addHTML(
+ Xml::openElement( 'fieldset' ) .
+ Xml::element( 'legend', null, wfMsg( 'search-external' ) ) .
+ Xml::element( 'p', array( 'class' => 'mw-searchdisabled' ), wfMsg( 'searchdisabled' ) ) .
wfMsg( 'googlesearch',
htmlspecialchars( $term ),
htmlspecialchars( $wgInputEncoding ),
htmlspecialchars( wfMsg( 'searchbutton' ) )
- )
+ ) .
+ Xml::closeElement( 'fieldset' )
);
wfProfileOut( $fname );
return;
$search = SearchEngine::create();
$search->setLimitOffset( $this->limit, $this->offset );
$search->setNamespaces( $this->namespaces );
- $search->showRedirects = $this->searchRedirects;
- $titleMatches = $search->searchTitle( $term );
+ $search->showRedirects = $this->searchRedirects;
+ $rewritten = $search->replacePrefixes($term);
+
+ $titleMatches = $search->searchTitle( $rewritten );
// Sometimes the search engine knows there are too many hits
if ($titleMatches instanceof SearchResultTooMany) {
wfProfileOut( $fname );
return;
}
- $textMatches = $search->searchText( $term );
+ $textMatches = $search->searchText( $rewritten );
// did you mean...
if($textMatches && $textMatches->hasSuggestion()){