46 $hasTitle = $titleResultSet && $titleResultSet->numRows() > 0;
47 $hasText = $textResultSet && $textResultSet->numRows() > 0;
50 $textResultSet->hasInterwikiResults( ISearchResultSet::SECONDARY_RESULTS );
53 $textResultSet->hasInterwikiResults( ISearchResultSet::INLINE_RESULTS );
55 if ( !$hasTitle && !$hasText && !$hasSecondary && !$hasSecondaryInline ) {
59 $out =
'<div class="mw-search-results-container">';
62 $out .= $this->
header( $this->specialPage->msg(
'titlematches' ) )
69 $out .=
"<div class='mw-search-visualclear'></div>" .
70 $this->
header( $this->specialPage->msg(
'textmatches' ) );
76 if ( $hasSecondaryInline ) {
77 $iwResults = $textResultSet->getInterwikiResults( ISearchResultSet::INLINE_RESULTS );
78 foreach ( $iwResults as $interwiki => $results ) {
79 if ( $results instanceof
Status || $results->numRows() === 0 ) {
84 "<h2 class='mw-search-interwiki-header mw-search-visualclear'>" .
85 $this->specialPage->msg(
"search-interwiki-results-{$interwiki}" )->parse() .
88 "<div class='mw-search-interwiki-results'>" .
97 if ( $hasSecondary ) {
98 $out .= $this->sidebarWidget->render(
100 $textResultSet->getInterwikiResults( ISearchResultSet::SECONDARY_RESULTS )
107 ->getLanguageConverter();
108 return $converter->convert( $out );