Skip to content

Commit

Permalink
fix check_issn hook (didn't work when the check digit=0)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfriviere committed Dec 13, 2018
1 parent f8440b2 commit 9ba97c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lodel/scripts/hookfunc.php
Expand Up @@ -73,7 +73,7 @@ function check_issn(&$context, $field, &$errors)
} }


$check %= 11; $check %= 11;
$check = 11 - $check; if ($check != 0) $check = 11 - $check;


if ($check == $checksum || (($check == 10) && ($checksum == 'X'))) { if ($check == $checksum || (($check == 10) && ($checksum == 'X'))) {
$context['data'][$field] = wordwrap($value,4,'-', true); $context['data'][$field] = wordwrap($value,4,'-', true);
Expand Down

0 comments on commit 9ba97c2

Please sign in to comment.