From fecf1efb9ab16714d72fca1d3a67e014f794d0f2 Mon Sep 17 00:00:00 2001 From: Erik Bernhardson Date: Mon, 7 Nov 2016 14:42:47 -0800 Subject: [PATCH] [search] Remove unused SpecialSearch functions AFAICT SpecialSearch is never extended into anything else. These functions are protected, an unused within this class. There are a couple other public functions that look unused, but i suppose a hook consumer could be using them so leaving in for now. Change-Id: I214c6144f81dade14a0a8c616743191a295b716d --- includes/specials/SpecialSearch.php | 36 ----------------------------- 1 file changed, 36 deletions(-) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 252ac31e39..f301e7c4cd 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -469,25 +469,6 @@ class SpecialSearch extends SpecialPage { return "

\n$wikiMsg

"; } - /** - * Decide if the suggested query should be run, and it's results returned - * instead of the provided $textMatches - * - * @param SearchResultSet $textMatches The results of a users query - * @return bool - */ - protected function shouldRunSuggestedQuery( SearchResultSet $textMatches ) { - if ( !$this->runSuggestion || - !$textMatches->hasSuggestion() || - $textMatches->numRows() > 0 || - $textMatches->searchContainedSyntax() - ) { - return false; - } - - return $this->getConfig()->get( 'SearchRunSuggestedQuery' ); - } - /** * Generates HTML shown to the user when we have a suggestion about a query * that might give more results than their current query. @@ -1332,23 +1313,6 @@ class SpecialSearch extends SpecialPage { return false; } - /** - * Check if query starts with all: prefix - * - * @param string $term The string to check - * @return bool - */ - protected function startsWithAll( $term ) { - $allkeyword = $this->msg( 'searchall' )->inContentLanguage()->text(); - - $parts = explode( ':', $term ); - if ( count( $parts ) > 1 ) { - return $parts[0] == $allkeyword; - } - - return false; - } - /** * @since 1.18 * -- 2.20.1