]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Force Amazon AC requests to use 10-digit ISBNs
authorDan Scott <dscott@laurentian.ca>
Tue, 1 Nov 2011 17:29:25 +0000 (13:29 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 1 Nov 2011 17:56:18 +0000 (13:56 -0400)
commit856ca6d995b8723e3fc17eef70ee738fe24219dc
treec3adce3efeebf318982f488cd0f32fbc61931d56
parente000ec5da7ec06c3179276e22a91dd76f80b4981
Force Amazon AC requests to use 10-digit ISBNs

Inspired by a patch submitted by Ian Bays <ian.bays@ptfs-europe.com>
via https://bugs.launchpad.net/evergreen/+bug/870171, this patch takes
the incoming key and, if it is longer than 10 characters (a 10-digit
ISBN or Amazon ID), attempts to normalize it and return a 10-digit ISBN.

We don't normalize all incoming keys because some sites are horribly
abusing the 020 MARC field to include an Amazon ID instead of an ISBN -
but that works in practice and we'd rather not break working
installations if we can avoid it.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent/Amazon.pm