search: make legalSearchChars() non-static
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 12 Apr 2019 00:54:26 +0000 (17:54 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Fri, 12 Apr 2019 00:55:54 +0000 (17:55 -0700)
No outside callers from code in gerrit are using this statically

Change-Id: I9513a5384bca71f419a9af09908678bcc86c0263

includes/search/SearchEngine.php
includes/search/SearchMySQL.php
includes/search/SearchOracle.php
includes/search/SearchSqlite.php

index 4cba19e..1f64dd4 100644 (file)
@@ -281,12 +281,11 @@ abstract class SearchEngine {
 
        /**
         * Get chars legal for search
 
        /**
         * Get chars legal for search
-        * NOTE: usage as static is deprecated and preserved only as BC measure
         * @param int $type type of search chars (see self::CHARS_ALL
         * and self::CHARS_NO_SYNTAX). Defaults to CHARS_ALL
         * @return string
         */
         * @param int $type type of search chars (see self::CHARS_ALL
         * and self::CHARS_NO_SYNTAX). Defaults to CHARS_ALL
         * @return string
         */
-       public static function legalSearchChars( $type = self::CHARS_ALL ) {
+       public function legalSearchChars( $type = self::CHARS_ALL ) {
                return "A-Za-z_'.0-9\\x80-\\xFF\\-";
        }
 
                return "A-Za-z_'.0-9\\x80-\\xFF\\-";
        }
 
index 9f10697..cae3426 100644 (file)
@@ -149,7 +149,7 @@ class SearchMySQL extends SearchDatabase {
                return $regex;
        }
 
                return $regex;
        }
 
-       public static function legalSearchChars( $type = self::CHARS_ALL ) {
+       public function legalSearchChars( $type = self::CHARS_ALL ) {
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        // " for phrase, * for wildcard
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        // " for phrase, * for wildcard
index 0cbb41c..6b2b403 100644 (file)
@@ -267,7 +267,7 @@ class SearchOracle extends SearchDatabase {
                        [] );
        }
 
                        [] );
        }
 
-       public static function legalSearchChars( $type = self::CHARS_ALL ) {
+       public function legalSearchChars( $type = self::CHARS_ALL ) {
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        $searchChars = "\"" . $searchChars;
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        $searchChars = "\"" . $searchChars;
index f653796..c304797 100644 (file)
@@ -142,7 +142,7 @@ class SearchSqlite extends SearchDatabase {
                return $regex;
        }
 
                return $regex;
        }
 
-       public static function legalSearchChars( $type = self::CHARS_ALL ) {
+       public function legalSearchChars( $type = self::CHARS_ALL ) {
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        // " for phrase, * for wildcard
                $searchChars = parent::legalSearchChars( $type );
                if ( $type === self::CHARS_ALL ) {
                        // " for phrase, * for wildcard