tpac avoid more org_unit template var leaks
authorBill Erickson <berick@esilibrary.com>
Tue, 12 Feb 2013 17:19:58 +0000 (12:19 -0500)
committerBen Shum <bshum@biblio.org>
Mon, 11 Mar 2013 21:42:53 +0000 (17:42 -0400)
Avoid using the variable name 'org_unit' in misc_utils (when compiling
copy visibility info) since the value can leak into the org_selector
template, disrupting the rendering of the org selector.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/misc_util.tt2

index 2d2f299..bddab42 100644 (file)
         FOR node IN xml.findnodes(xpath);
             FOR attr IN ['count', 'available', 'unshadow', 'transcendant', 'org_unit']; 
                 depth = node.getAttribute('depth');
-                org_unit = node.getAttribute('org_unit');
+                count_org_unit = node.getAttribute('org_unit');
                 args.copy_counts.$depth.$attr = node.getAttribute(attr);
-                args.org_copy_counts.$org_unit.$attr = node.getAttribute(attr);
+                args.org_copy_counts.$count_org_unit.$attr = node.getAttribute(attr);
             END;
         END;