EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/320304

Change subject: [search] Remove unused SpecialSearch functions
......................................................................

[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
---
M includes/specials/SpecialSearch.php
1 file changed, 0 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/320304/1

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 6daf19f..9968f2e 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -471,25 +471,6 @@
        }
 
        /**
-        * 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.
         */
@@ -1330,24 +1311,6 @@
                $parts = explode( ':', $term );
                if ( count( $parts ) > 1 ) {
                        return $wgContLang->getNsIndex( $parts[0] ) == NS_FILE;
-               }
-
-               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;

-- 
To view, visit https://gerrit.wikimedia.org/r/320304
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I214c6144f81dade14a0a8c616743191a295b716d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to