$this->powerSearchOptions()
);
+ $suggestionSnippet = $textMatches->getSuggestionSnippet();
+
+ if( $suggestionSnippet == '' )
+ $suggestionSnippet = null;
+
$suggestLink = $sk->linkKnown(
$st,
- $textMatches->getSuggestionSnippet(),
+ $suggestionSnippet,
array(),
$stParams
);
$sk = $wgUser->getSkin();
$t = $result->getTitle();
+ $titleSnippet = $result->getTitleSnippet($terms);
+
+ if( $titleSnippet == '' )
+ $titleSnippet = null;
+
$link = $this->sk->linkKnown(
$t,
- $result->getTitleSnippet($terms)
+ $titleSnippet
);
//If page content is not readable, just return the title.
$sectionText = $result->getSectionSnippet($terms);
$redirect = '';
- if( !is_null($redirectTitle) )
+ if( !is_null($redirectTitle) ) {
+ if( $redirectText == '' )
+ $redirectText = null;
+
$redirect = "<span class='searchalttitle'>" .
wfMsg(
'search-redirect',
)
) .
"</span>";
+ }
$section = '';
- if( !is_null($sectionTitle) )
+
+ if( !is_null($sectionTitle) ) {
+ if( $sectionText == '' )
+ $sectionText = null;
+
$section = "<span class='searchalttitle'>" .
wfMsg(
'search-section', $this->sk->linkKnown(
)
) .
"</span>";
+ }
// format text extract
$extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>";
$t = $result->getTitle();
+ $titleSnippet = $result->getTitleSnippet($terms);
+
+ if( $titleSnippet == '' )
+ $titleSnippet = null;
+
$link = $this->sk->linkKnown(
$t,
- $result->getTitleSnippet($terms)
+ $titleSnippet
);
// format redirect if any
$redirectTitle = $result->getRedirectTitle();
$redirectText = $result->getRedirectSnippet($terms);
$redirect = '';
- if( !is_null($redirectTitle) )
+ if( !is_null($redirectTitle) ) {
+ if( $redirectText == '' )
+ $redirectText = null;
+
$redirect = "<span class='searchalttitle'>" .
wfMsg(
'search-redirect',
)
) .
"</span>";
+ }
$out = "";
// display project name
$this->powerSearchOptions()
);
+ $suggestionSnippet = $textMatches->getSuggestionSnippet();
+
+ if( $suggestionSnippet )
+ $suggestionSnippet = null;
+
$suggestLink = $sk->linkKnown(
$st,
- $textMatches->getSuggestionSnippet(),
+ $suggestionSnippet,
array(),
$stParams
);
$t = $result->getTitle();
$sk = $wgUser->getSkin();
+ $titleSnippet = $result->getTitleSnippet($terms);
+
+ if( $titleSnippet == '' )
+ $titleSnippet = null;
+
$link = $sk->linkKnown(
$t,
- $result->getTitleSnippet($terms)
+ $titleSnippet
);
//If page content is not readable, just return the title.
$sectionTitle = $result->getSectionTitle();
$sectionText = $result->getSectionSnippet($terms);
$redirect = '';
- if( !is_null($redirectTitle) )
+ if( !is_null($redirectTitle) ) {
+ if( $redirectText == '' )
+ $redirectText = null;
+
$redirect = "<span class='searchalttitle'>" .
wfMsg(
'search-redirect',
)
) .
"</span>";
+ }
+
$section = '';
- if( !is_null($sectionTitle) )
+
+ if( !is_null($sectionTitle) ) {
+ if( $sectionText == '' )
+ $sectionText = null;
+
$section = "<span class='searchalttitle'>" .
wfMsg(
'search-section',
)
) .
"</span>";
+ }
// format text extract
$extract = "<div class='searchresult'>".$result->getTextSnippet($terms)."</div>";
$t = $result->getTitle();
$sk = $wgUser->getSkin();
+ $titleSnippet = $result->getTitleSnippet($terms);
+
+ if( $titleSnippet == '' )
+ $titleSnippet = null;
+
$link = $sk->linkKnown(
$t,
- $result->getTitleSnippet( $terms )
+ $titleSnippet
);
// format redirect if any
$redirectTitle = $result->getRedirectTitle();
$redirectText = $result->getRedirectSnippet($terms);
$redirect = '';
- if( !is_null($redirectTitle) )
+ if( !is_null($redirectTitle) ) {
+ if( $redirectText == '' )
+ $redirectText = null;
+
$redirect = "<span class='searchalttitle'>" .
wfMsg(
'search-redirect',
)
) .
"</span>";
+ }
$out = "";
// display project name