Use location-specific opac.barcode_regex user/jeff/lp971680_local_patron_barcode_regex_rel_2_1
authorJeff Godin <jgodin@tadl.org>
Sun, 28 Aug 2011 23:06:02 +0000 (19:06 -0400)
committerJeff Godin <jgodin@tadl.org>
Mon, 2 Apr 2012 16:52:56 +0000 (12:52 -0400)
Instead of fetching the opac.barcode_regex setting based on
globalOrgTree.id(), use the value of getLocation().

This is useful in situations where a system within a consortium
uses a different barcode regex than the rest of the consortium.

Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/web/opac/common/js/opac_utils.js
Open-ILS/web/opac/skin/default/js/myopac.js

index b699f46..702ea0c 100644 (file)
@@ -730,7 +730,7 @@ function doLogin(suppressEvents) {
                org             : getOrigLocation()
        };
 
-    r = fetchOrgSettingDefault(globalOrgTree.id(), 'opac.barcode_regex');
+    r = fetchOrgSettingDefault(getLocation(), 'opac.barcode_regex');
     if(r) REGEX_BARCODE = new RegExp(r);
     
     if( uname.match(REGEX_BARCODE) ) args.barcode = uname;
index 925997a..ab53aa6 100644 (file)
@@ -1071,7 +1071,7 @@ function myOPACUpdateUsername() {
                return;
        }
 
-    r = fetchOrgSettingDefault(globalOrgTree.id(), 'opac.barcode_regex');
+    r = fetchOrgSettingDefault(getLocation(), 'opac.barcode_regex');
     if(r) REGEX_BARCODE = new RegExp(r);
 
     if(username.match(REGEX_BARCODE)) {