46 $hasTitle = $titleResultSet ? $titleResultSet->numRows() > 0 :
false;
47 $hasText = $textResultSet ? $textResultSet->numRows() > 0 :
false;
48 $hasSecondary = $textResultSet
51 $hasSecondaryInline = $textResultSet
55 if ( !$hasTitle && !$hasText && !$hasSecondary && !$hasSecondaryInline ) {
61 $out .= $this->
header( $this->specialPage->msg(
'titlematches' ) )
68 $out .=
"<div class='mw-search-visualclear'></div>" .
69 $this->
header( $this->specialPage->msg(
'textmatches' ) );
75 if ( $hasSecondaryInline ) {
77 foreach ( $iwResults as $interwiki => $results ) {
78 if ( $results instanceof
Status || $results->numRows() === 0 ) {
83 "<h2 class='mw-search-interwiki-header mw-search-visualclear'>" .
84 $this->specialPage->msg(
"search-interwiki-results-{$interwiki}" )->parse() .
90 if ( $hasSecondary ) {
91 $out .= $this->sidebarWidget->render(
100 ->getLanguageConverter();
101 return $converter->convert( $out );
114 "<span class='mw-headline'>" . $msg->
escaped() .
"</span>" .
125 foreach ( $resultSet as $result ) {
126 $hits[] = $this->resultWidget->render( $result, $offset++ );
129 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.