dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Make Special:MediaStatistics show a total count of file sizes"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialSearch.php
diff --git
a/includes/specials/SpecialSearch.php
b/includes/specials/SpecialSearch.php
index
d6ce6a4
..
8809900
100644
(file)
--- a/
includes/specials/SpecialSearch.php
+++ b/
includes/specials/SpecialSearch.php
@@
-99,6
+99,7
@@
class SpecialSearch extends SpecialPage {
'mediawiki.special', 'mediawiki.special.search', 'mediawiki.ui', 'mediawiki.ui.button',
'mediawiki.ui.input',
) );
'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!
// Strip underscores from title parameter; most of the time we'll want
// text form here. But don't strip underscores from actual text params!
@@
-383,11
+384,10
@@
class SpecialSearch extends SpecialPage {
$out->addHTML( $this->showInterwiki( $textMatches->getInterwikiResults(
SearchResultSet::SECONDARY_RESULTS ), $term ) );
}
$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 ( $num === 0 ) {
if ( $textStatus ) {
@@
-414,6
+414,10
@@
class SpecialSearch extends SpecialPage {
}
}
}
}
+ if ( $textMatches ) {
+ $textMatches->free();
+ }
+
$out->addHTML( '<div class="visualClear"></div>' );
if ( $prevnext ) {
$out->addHTML( '<div class="visualClear"></div>' );
if ( $prevnext ) {
@@
-430,6
+434,7
@@
class SpecialSearch extends SpecialPage {
* Produce wiki header for interwiki results
* @param string $interwiki Interwiki name
* @param SearchResultSet $interwikiResult The result set
* 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
*/
protected function interwikiHeader( $interwiki, $interwikiResult ) {
// TODO: we need to figure out how to name wikis correctly
@@
-848,6
+853,7
@@
class SpecialSearch extends SpecialPage {
$html = null;
$score = '';
$html = null;
$score = '';
+ $related = '';
if ( Hooks::run( 'ShowSearchHit', array(
$this, $result, $terms,
&$link, &$redirect, &$section, &$extract,
if ( Hooks::run( 'ShowSearchHit', array(
$this, $result, $terms,
&$link, &$redirect, &$section, &$extract,