[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. cdda11af2f411a1fad7e2d571b94af80523fa2ba
Evergreen Git
git at git.evergreen-ils.org
Thu Aug 7 11:08:45 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via cdda11af2f411a1fad7e2d571b94af80523fa2ba (commit)
via 76bb7b2329faf41e861e91a16ca69f1122d9a7d3 (commit)
from b69c63b9ce59a22d74d103686d57af3530436417 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit cdda11af2f411a1fad7e2d571b94af80523fa2ba
Author: Jason Stephenson <jstephenson at mvlc.org>
Date: Wed Jul 9 16:34:26 2014 -0400
LP#1302207 - Attempt to validate ISBNs in AddedContent.pm.
When getting ISBNs from the database, they often contain extra stuff
after the ISBN that sometimes causes problems for Business::ISBN.
This commit attempts to resolve some of that by looking only for the
part of the ISBN data that resembles an ISBN and using just that part.
If the ISBN data doesn't look like an ISBN, then it is discarded.
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
index 276dcc9..e2adf6d 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
@@ -143,10 +143,19 @@ sub handler {
my @upcs = grep {$_->{tag} eq '024'} @$key_data;
map {
- my $isbn_obj = Business::ISBN->new($_->{value});
- my $isbn_str;
- $isbn_str = $isbn_obj->as_string([]) if defined($isbn_obj);
- $_->{value} = $isbn_str;
+ # Attempt to validate the ISBN.
+ # strip out hyphens;
+ $_->{value} =~ s/-//g;
+ #pull out the first chunk that looks like an ISBN:
+ if ($_->{value} =~ /([0-9xX]{10}(?:[0-9xX]{3})?)/) {
+ $_->{value} = $1;
+ my $isbn_obj = Business::ISBN->new($_->{value});
+ my $isbn_str;
+ $isbn_str = $isbn_obj->as_string([]) if defined($isbn_obj);
+ $_->{value} = $isbn_str;
+ } else {
+ undef $_->{value};
+ }
undef $_ if !defined($_->{value});
} @isbns;
commit 76bb7b2329faf41e861e91a16ca69f1122d9a7d3
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Fri Apr 11 16:05:07 2014 -0400
LP#1302207 - Order AddedContent identifiers
When multiple exist coming out in a consistent order is preferred.
In this case, use ID order.
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
index e1c0bf0..276dcc9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm
@@ -224,7 +224,10 @@ sub get_rec_keys {
]
}
]
- }
+ },
+ order_by => [
+ { class => 'mfr', field => 'id' }
+ ]
});
}
-----------------------------------------------------------------------
Summary of changes:
.../src/perlmods/lib/OpenILS/WWW/AddedContent.pm | 22 +++++++++++++++----
1 files changed, 17 insertions(+), 5 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list