From 2506f44116762d102e02bc190b55d7e82d56c6da Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 21 Sep 2012 17:10:58 -0400 Subject: [PATCH] Copy location group searching repairs In the get_library BLOCK, upgrade any use of 'loc' to 'locg' instead of trying to determine which to use in which situation. Before this change, 'loc' was being used as the loc_name for the main org unit selector, which should always use 'locg'. For any other cases (related to search params), it's always safe to use 'locg' over 'loc'. Signed-off-by: Bill Erickson Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/parts/misc_util.tt2 | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 67805ac8b1..45d3f54ca1 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -281,16 +281,10 @@ # Get the library or location group # get_library() + # magically upgrades any use of 'loc' to 'locg', + # which is a superset of 'loc'. BLOCK get_library; - IF !loc_name; - loc_name = 'loc'; - IF show_loc_groups; loc_name = 'locg'; END; - END; - IF !loc_value; - loc_value = CGI.param('loc') || ctx.search_ou; - IF show_loc_groups; - loc_value = CGI.param('locg') || ctx.search_ou; - END; - END; + loc_name = 'locg'; + loc_value = CGI.param(loc_name) || CGI.param('loc') || ctx.search_ou; END; %] -- 2.43.2