/** * Check MySQL server's ft_min_word_len setting so we know * if we need to pad short words... * * @return int */ protected function minSearchLength() { if (is_null(self::$mMinSearchLength)) { $sql = "SHOW GLOBAL VARIABLES LIKE 'ft\\_min\\_word\\_len'"; $dbr = wfGetDB(DB_SLAVE); $result = $dbr->query($sql); $row = $result->fetchObject(); $result->free(); if ($row && $row->Variable_name == 'ft_min_word_len') { self::$mMinSearchLength = intval($row->Value); } else { self::$mMinSearchLength = 0; } } return self::$mMinSearchLength; }
public static function legalSearchChars() { return "\"*" . parent::legalSearchChars(); }