$vals['sectionsnippet'] = $result->getSectionSnippet();
}
}
- if ( isset( $prop['hasrelated'] ) && $result->hasRelated() ) {
- $vals['hasrelated'] = '';
- }
// Add item to results and see whether it fits
$fit = $apiResult->addValue( array( 'query', $this->getModuleName() ),
return strlen( $this->mText );
}
- /**
- * @return bool If hit has related articles
- */
- function hasRelated() {
- return false;
- }
-
/**
* @return string Interwiki prefix of the title (return iw even if title is broken)
*/
$date = $lang->userTimeAndDate( $timestamp, $this->getUser() );
- // link to related articles if supported
- $related = '';
- if ( $result->hasRelated() ) {
- $stParams = array_merge(
- $this->powerSearchOptions(),
- array(
- 'search' => $this->msg( 'searchrelated' )->inContentLanguage()->text() .
- ':' . $title->getPrefixedText(),
- 'fulltext' => $this->msg( 'search' )->text()
- )
- );
-
- $related = ' -- ' . Linker::linkKnown(
- $this->getPageTitle(),
- $this->msg( 'search-relatedarticle' )->text(),
- array(),
- $stParams
- );
- }
-
$fileMatch = '';
// Include a thumbnail for media files...
if ( $title->getNamespace() == NS_FILE ) {
'<td style="vertical-align: top;">' .
"{$link} {$redirect} {$section} {$fileMatch}" .
$extract .
- "<div class='mw-search-result-data'>{$desc} - {$date}{$related}</div>" .
+ "<div class='mw-search-result-data'>{$desc} - {$date}</div>" .
'</td>' .
'</tr>' .
'</table>' .
) ) ) {
$html = "<li><div class='mw-search-result-heading'>" .
"{$link} {$redirect} {$section} {$fileMatch}</div> {$extract}\n" .
- "<div class='mw-search-result-data'>{$size} - {$date}{$related}</div>" .
+ "<div class='mw-search-result-data'>{$size} - {$date}</div>" .
"</li>\n";
}