The shelf browser currently uses the 'loc' variable to define scoping and
limit browsing to specific org units. However, since much of the scoping
actually uses 'locg', the scoping was broken for the shelf browser.
Additionally, under Advanced Search's Numeric Search, the option for
'Call Number (Shelf Browse)' only applies the 'cn' variable to searches
and never adds the search scope, despite the search library now being
an available filter choice.
Based on suggestion by Dan Scott in IRC, this patch uses the function for
_get_search_lib() to retrieve the search library and add it to both parts
of the shelf browser.
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
my $cn = ($self->cgi->param("cn") || $self->any_call_number_label) or
return [];
- my $org_unit = $self->ctx->{get_aou}->($self->cgi->param('loc')) ||
+ my $org_unit = $self->ctx->{get_aou}->($self->_get_search_lib()) ||
$self->ctx->{aou_tree}->();
my $supercat = create OpenSRF::AppSession("open-ils.supercat");
$self->ctx->{opac_root},
$cnfrag # XXX some kind of escaping needed here?
);
+ $url .= '&locg=' . $self->_get_search_lib() if ($self->_get_search_lib());
return $self->generic_redirect($url);
} else {
return $self->generic_redirect; # return to search page