'mediawiki.special', 'mediawiki.special.search', 'mediawiki.ui', 'mediawiki.ui.button',
'mediawiki.ui.input',
) );
+ $this->addHelpLink( 'Help:Searching' );
// Strip underscores from title parameter; most of the time we'll want
// text form here. But don't strip underscores from actual text params!
$out->addHTML( $this->showInterwiki( $textMatches->getInterwikiResults(
SearchResultSet::SECONDARY_RESULTS ), $term ) );
}
-
- $textMatches->free();
}
- $hasOtherResults = $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS );
+ $hasOtherResults = $textMatches &&
+ $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS );
if ( $num === 0 ) {
if ( $textStatus ) {
}
}
+ if ( $textMatches ) {
+ $textMatches->free();
+ }
+
$out->addHTML( '<div class="visualClear"></div>' );
if ( $prevnext ) {
* Produce wiki header for interwiki results
* @param string $interwiki Interwiki name
* @param SearchResultSet $interwikiResult The result set
+ * @return string
*/
protected function interwikiHeader( $interwiki, $interwikiResult ) {
// TODO: we need to figure out how to name wikis correctly
$html = null;
$score = '';
+ $related = '';
if ( Hooks::run( 'ShowSearchHit', array(
$this, $result, $terms,
&$link, &$redirect, &$section, &$extract,