Use location-specific opac.barcode_regex user/jeff/lp971680_local_patron_barcode_regex
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 17:09:53 +0000 (13:09 -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

index 78557b6..ef42bc1 100644 (file)
@@ -729,7 +729,7 @@ function doLogin(suppressEvents) {
                agent : 'opac'
        };
 
-       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;