Chad has uploaded a new change for review. https://gerrit.wikimedia.org/r/159534
Change subject: Remove "related" searches ...................................................................... Remove "related" searches Poorly documented and never used anywhere properly. - MWSearch implements it but we've never turned it on. - SolrStore copies MWSearch but it doesn't even work. - CirrusSearch doesn't bother because it's silly. Change-Id: I8b052e8e772030fba6c361fdb2775b10a7f7a15a --- M includes/api/ApiQuerySearch.php M includes/search/SearchResult.php M includes/specials/SpecialSearch.php 3 files changed, 2 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/34/159534/1 diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index be6bc68..6c50237 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -176,9 +176,6 @@ $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() ), diff --git a/includes/search/SearchResult.php b/includes/search/SearchResult.php index 1d28691..c6d5d4f 100644 --- a/includes/search/SearchResult.php +++ b/includes/search/SearchResult.php @@ -243,13 +243,6 @@ } /** - * @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) */ function getInterwikiPrefix() { diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 3407476..5cbc422 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -673,26 +673,6 @@ $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 ) { @@ -718,7 +698,7 @@ '<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>' . @@ -738,7 +718,7 @@ ) ) ) { $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"; } -- To view, visit https://gerrit.wikimedia.org/r/159534 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b052e8e772030fba6c361fdb2775b10a7f7a15a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Chad <ch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits