+ $this->didYouMeanHtml = '<div class="searchdidyoumean">'.wfMsg('search-suggest',$suggestLink).'</div>';
+ }
+
+ // start rendering the page
+ $wgOut->addHtml(
+ Xml::openElement( 'table', array( 'border'=>0, 'cellpadding'=>0, 'cellspacing'=>0 ) ) .
+ Xml::openElement( 'tr' ) .
+ Xml::openElement( 'td' ) . "\n" .
+ ( $this->searchAdvanced ? $this->powerSearchBox( $term ) : $this->shortDialog( $term ) ) .
+ Xml::closeElement('td') .
+ Xml::closeElement('tr') .
+ Xml::closeElement('table')
+ );
+
+ // Sometimes the search engine knows there are too many hits
+ if( $titleMatches instanceof SearchResultTooMany ) {
+ $wgOut->addWikiText( '==' . wfMsg( 'toomanymatches' ) . "==\n" );
+ wfProfileOut( __METHOD__ );
+ return;
+ }
+
+ $filePrefix = $wgContLang->getFormattedNsText(NS_FILE).':';
+ if( '' === trim( $term ) || $filePrefix === trim( $term ) ) {
+ $wgOut->addHTML( $this->searchAdvanced ? $this->powerSearchFocus() : $this->searchFocus() );
+ // Empty query -- straight view of search form
+ wfProfileOut( __METHOD__ );
+ return;