You are here

function is_assigned in ISBN Field 6

File

./isbn.inc, line 333

Code

function is_assigned($isbn_proto) {
  $isbn_proto = ISN_clean($isbn_proto);
  global $country_group_map;
  $cg = country_group_code($isbn_proto);
  $cglen = strlen($cg);
  $after_cg = substr($isbn_proto, $cglen);
  if (is_array($country_group_map[$cg])) {
    $publen = prefix_length_from_map($after_cg, $country_group_map[$cg][0]);
    return $cglen + $publen < 9;
  }
  else {
    return false;
  }
}