You are here

function fuzzysearch_requirements in Fuzzy Search 6

File

./fuzzysearch.install, line 116
Install file for fuzzysearch module.

Code

function fuzzysearch_requirements() {
  include_once './includes/unicode.inc';

  // Notify that Mbstring extension is necessary for multibyte characters.
  $t = get_t();
  $libraries = array(
    UNICODE_SINGLEBYTE => $t('Multibyte characters not supported in searching.'),
    UNICODE_MULTIBYTE => $t('Multibyte characters are supported in searching.'),
    UNICODE_ERROR => $t('Multibyte characters not supported in searching.'),
  );
  $severities = array(
    UNICODE_SINGLEBYTE => REQUIREMENT_WARNING,
    UNICODE_MULTIBYTE => REQUIREMENT_OK,
    UNICODE_ERROR => REQUIREMENT_ERROR,
  );
  list($library, $description) = _unicode_check();
  $requirements['fuzzysearch'] = array(
    'title' => $t('Fuzzysearch module'),
    'value' => $libraries[$library],
  );
  if ($description) {
    $requirements['fuzzysearch']['description'] = $description;
  }
  $requirements['fuzzysearch']['severity'] = $severities[$library];
  return $requirements;
}