From: berick Date: Wed, 20 Apr 2011 13:57:34 +0000 (-0400) Subject: use the more explicit get_foo instead of find_foo for pub/cache object lookup X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=eb60407cac5f8d43c16b4f29c7590e3f52d17ca9;p=evergreen%2Fequinox.git use the more explicit get_foo instead of find_foo for pub/cache object lookup --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm index 5c6046d1c0..9577121159 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -80,7 +80,7 @@ sub _prepare_biblio_search { my $site; my $org = $cgi->param('loc'); if (defined($org) and $org ne '' and ($org ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\S+\)/) { - $site = $ctx->{find_aou}->($org)->shortname; + $site = $ctx->{get_aou}->($org)->shortname; $query .= " site($site)"; } @@ -93,7 +93,7 @@ sub _prepare_biblio_search { my $depth; if (defined($cgi->param('depth')) and not $query =~ /depth\(\d+\)/) { $depth = defined $cgi->param('depth') ? - $cgi->param('depth') : $ctx->{find_aou}->($site)->ou_type->depth; + $cgi->param('depth') : $ctx->{get_aou}->($site)->ou_type->depth; $query .= " depth($depth)"; } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm index 456f9c3672..282d0e1cc6 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm @@ -41,7 +41,7 @@ sub init_ro_object_cache { $eclass =~ s/::/_/g; my $list_key = "${hint}_list"; - my $find_key = "find_$hint"; + my $get_key = "get_$hint"; $ro_object_subs->{$list_key} = sub { my $method = "retrieve_all_$eclass"; @@ -51,7 +51,7 @@ sub init_ro_object_cache { $cache{map}{$hint} = {} unless $cache{map}{$hint}; - $ro_object_subs->{$find_key} = sub { + $ro_object_subs->{$get_key} = sub { my $id = shift; return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id}; ($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ro_object_subs->{$list_key}->()}; @@ -76,7 +76,7 @@ sub init_ro_object_cache { sub flesh_aout { my $node = shift; my $ro_object_subs = shift; - $node->ou_type( $ro_object_subs->{find_aout}->($node->ou_type) ); + $node->ou_type( $ro_object_subs->{get_aout}->($node->ou_type) ); $cache{map}{aou}{$node->id} = $node; flesh_aout($_, $ro_object_subs) foreach @{$node->children}; }; @@ -89,7 +89,7 @@ sub init_ro_object_cache { }; # Add a special handler for the tree-shaped org unit cache - $ro_object_subs->{find_aou} = sub { + $ro_object_subs->{get_aou} = sub { my $org_id = shift; $ro_object_subs->{aou_tree}->(); # force the org tree to load return $cache{map}{aou}{$org_id}; @@ -190,7 +190,7 @@ sub get_records_and_facets { if ($facet_key) { $facets = $facet_req->gather(1); $facets->{$_} = { - cmf => $self->ctx->{find_cmf}->($_), + cmf => $self->ctx->{get_cmf}->($_), data => $facets->{$_} } for keys %$facets; # quick-n-dirty } else { diff --git a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 index 999d6b76be..ac8d99cf90 100644 --- a/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/hold_history.tt2 @@ -81,7 +81,7 @@ - [% ctx.find_aou(ahr.pickup_lib).name %] + [% ctx.get_aou(ahr.pickup_lib).name %] [% IF ahr.frozen == 't' AND ahr.thaw_date; diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 index ec188319eb..1a7c814197 100644 --- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 @@ -154,7 +154,7 @@ - [% ctx.find_aou(ahr.pickup_lib).name %] + [% ctx.get_aou(ahr.pickup_lib).name %]