]> git.evergreen-ils.org Git - 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:58:30 +0000 (13:58 -0400)
commit62f856b4a70b8495cd1b521dcc90c1942bad00e0
treebe13134a3eb9fb8ce1329ecc6a249cb5ccaf73d4
parent2a16698bec2e5cc210c6f2bc10c6389c78b5293d
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/OpenILS/WWW/AddedContent/Amazon.pm