Fix bug in Z39.50 searching
authorArt Rhyno <art632000@yahoo.ca>
Fri, 11 Jan 2013 00:57:38 +0000 (19:57 -0500)
committerArt Rhyno <art632000@yahoo.ca>
Fri, 11 Jan 2013 00:57:38 +0000 (19:57 -0500)
If a site had not defined EVERGREEN_OPAC_URL in settings,
the Z39.50 search was tripping on it. Thanks to shadowspar
for catching it. Also updated the date for the new year.

Signed-off-by: Art Rhyno <art632000@yahoo.ca>
conifer/integration/evergreen_site.py
conifer/templates/master.xhtml

index f0d8f4d..6f4b3a3 100644 (file)
@@ -19,7 +19,7 @@ try:
     OSRF_LIB_INSTALLED = True
 except ImportError:
     OSRF_LIB_INSTALLED = False
-
+    
 if OSRF_LIB_INSTALLED:
     from conifer.libsystems.evergreen.startup import ils_startup
 
@@ -481,14 +481,13 @@ class EvergreenIntegration(object):
         # TODO: move this to local_settings
         LIBCODE = 'OWA'                        
         if hasattr(settings, 'EVERGREEN_LIBCODE'):
-           LIBCODE = settings.EVERGREEN_OPAC_URL
+           # LIBCODE = settings.EVERGREEN_OPAC_URL
+           LIBCODE = self.OPAC_URL
         try:
             dct           = M.marcxml_to_dictionary(marc_string)
             words = lambda string: re.findall(r'\S+', string)
             keys  = words(dct.get('8569'))
             urls  = words(dct.get('856u'))
-            print 'KEYS:', keys
-            print 'URLS:', urls
             return urls[keys.index(LIBCODE)]
         except:
             return None
index ce833dc..d65c74c 100644 (file)
@@ -72,7 +72,7 @@ from django.conf import settings
       </div>
       <div id="footer">
        <div> 
-    Syrup is a subproject of <a href="http://projectconifer.ca">Project Conifer</a> &copy; 2012
+    Syrup is a subproject of <a href="http://projectconifer.ca">Project Conifer</a> &copy; 2013
     </div>
       </div>
       </div>