diff --git a/includes/utilities.php b/includes/utilities.php index 92e27277..049baeed 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -881,12 +881,6 @@ abstract class Util )); } - // todo: create Locale object and integrate - public static function isLogographic(int $localeId) : bool - { - return $localeId == LOCALE_CN || $localeId == LOCALE_TW || $localeId == LOCALE_KR; - } - // default back to enUS if localization unavailable public static function localizedString(array $data, string $field, bool $silent = false) : string { diff --git a/pages/search.php b/pages/search.php index a8891f1d..fc60c1b1 100644 --- a/pages/search.php +++ b/pages/search.php @@ -138,14 +138,14 @@ class SearchPage extends GenericPage continue; else if ($clean[0] == '-') { - if (mb_strlen($clean) < 4 && !Util::isLogographic(Lang::getLocale()->value)) + if (mb_strlen($clean) < 4 && !Lang::getLocale()->isLogographic()) $this->invalid[] = mb_substr($raw, 1); else $this->excluded[] = mb_substr(str_replace('_', '\\_', $clean), 1); } else if ($clean !== '') { - if (mb_strlen($clean) < 3 && !Util::isLogographic(Lang::getLocale()->value)) + if (mb_strlen($clean) < 3 && !Lang::getLocale()->isLogographic()) $this->invalid[] = $raw; else $this->included[] = str_replace('_', '\\_', $clean);