[open-ils-commits] [GIT] Evergreen ILS branch master updated. 3759c86cc548f11f58ea54792e4b886bde6b7b53

Evergreen Git git at git.evergreen-ils.org
Fri Nov 4 17:14:23 EDT 2011


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  3759c86cc548f11f58ea54792e4b886bde6b7b53 (commit)
      from  25c2dbe0ad7b9f642181dd504d58e87790ad6a8f (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 3759c86cc548f11f58ea54792e4b886bde6b7b53
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Oct 24 13:52:14 2011 -0400

    TPac; improved UPC extraction
    
    Handle the case where a record has multiple UPC's.  When this occurs,
    use the first UPC as the value for added content lookups as necessary.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2
index 38944f6..3089984 100644
--- a/Open-ILS/src/templates/opac/parts/misc_util.tt2
+++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2
@@ -7,7 +7,11 @@
         FOR isbn IN xml.findnodes('//*[@tag="020"]/*[@code="a"]');
             args.isbns.push(isbn.textContent);
         END;
-        args.upc = xml.findnodes('//*[@tag="024"]/*[@code="a"]').textContent;
+        args.upcs = [];
+        FOR upc IN xml.findnodes('//*[@tag="024"]/*[@code="a"]');
+            args.upcs.push(upc.textContent);
+        END;
+        args.upc = args.upcs.0; # use first UPC as the default
         args.issn = xml.findnodes('//*[@tag="022"]/*[@code="a"]').textContent;
         args.title = xml.findnodes('//*[@tag="245"]/*[@code="a"]').textContent;
         args.title_extended = xml.findnodes('//*[@tag="245"]').textContent;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/opac/parts/misc_util.tt2 |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list