46 $hasTitle = $titleResultSet && $titleResultSet->numRows() > 0;
47 $hasText = $textResultSet && $textResultSet->numRows() > 0;
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 ) {
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(
107 ->getLanguageConverter();
108 return $converter->convert( $out );
120 return "<h2>" . $msg->
escaped() .
"</h2>";
130 foreach ( $resultSet as $result ) {
131 $hits[] = $this->resultWidget->render( $result, $offset++ );
134 return "<ul class='mw-search-results'>" . implode(
'', $hits ) .
"</ul>";
The Message class deals with fetching and processing of interface message into a variety of formats.
escaped()
Returns the message text.
implements Special:Search - Run text & title search and display the output
Generic operation result class Has warning/error list, boolean status and arbitrary value.
A set of SearchEngine results.
const INLINE_RESULTS
Identifier for interwiki results that can be displayed even if no existing main wiki results exist.
const SECONDARY_RESULTS
Identifier for interwiki results that are displayed only together with existing main wiki results.