X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsearch%2FSearchEngine.php;h=70117db76cd7719f516ac76fac8a7e9d59d00ddf;hb=4a5f646a7fea7cbe0421c5cf38b72bae5c1bcf65;hp=7d05265bad5a77b0d73039c5c8e700caa2c41c97;hpb=b4ba469f260efe4bc1254c08cf70771b33c328fd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index 7d05265bad..70117db76c 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -60,6 +60,12 @@ abstract class SearchEngine { /** @const string profile type for query independent ranking features */ const FT_QUERY_INDEP_PROFILE_TYPE = 'fulltextQueryIndepProfile'; + /** @const int flag for legalSearchChars: includes all chars allowed in a search query */ + const CHARS_ALL = 1; + + /** @const int flag for legalSearchChars: includes all chars allowed in a search term */ + const CHARS_NO_SYNTAX = 2; + /** * Perform a full text search query and return a result set. * If full text searches are not supported or disabled, return null. @@ -206,24 +212,16 @@ abstract class SearchEngine { } /** - * Get chars legal for search (at query time). + * 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 */ - public static function legalSearchChars() { + public static function legalSearchChars( $type = self::CHARS_ALL ) { return "A-Za-z_'.0-9\\x80-\\xFF\\-"; } - /** - * Get chars legal for search (at index time). - * - * @since 1.30 - * @return string - */ - public function legalSearchCharsForUpdate() { - return static::legalSearchChars(); - } - /** * Set the maximum number of results to return * and how many to skip before returning the first.