TPAC: Process loc/locg inside build_org_selector
authorDan Scott <dscott@laurentian.ca>
Mon, 13 Aug 2012 22:36:10 +0000 (18:36 -0400)
committerDan Scott <dscott@laurentian.ca>
Mon, 13 Aug 2012 22:44:39 +0000 (18:44 -0400)
As show_loc_groups only gets passed to build_org_selector as a
parameter, get_library didn't have a chance to properly check for that
value and therefore was generating loc instead of locg as a CGI param.
The problem was noted by Ben Shum in IRC.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/templates/opac/parts/org_selector.tt2

index 159af59..a95dd7d 100644 (file)
@@ -7,12 +7,13 @@
 # Use of PROCESS results in internal variables, such as value or org_unit, to "leak" out
 
 PROCESS "opac/parts/misc_util.tt2";
-PROCESS get_library;
 
 BLOCK build_org_selector;
     node_stack = [{org => org_unit || ctx.aouct_tree || ctx.aou_tree}];
     inherited_vis = ctx.get_cgf('opac.org_unit.non_inherited_visibility').enabled == 'f';
 
+    PROCESS get_library;
+
     IF !name; 
         name = loc_name;
     END;