Before this commit, the context org unit for carousels was the same as
the physical_loc environment variable, or the client-passed physcial
location, or the search location, whichever was set in that order. This
commit provides the ability to specify a carousel_loc environment
variable in the apache vhost configuration, as an override to
physical_loc. This, in turn, allows hostname-segregated branches of the
org hierarchy in a resource sharing group to specify their own carousels
even when they want the top of the group to be the default search
location.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
$ctx->{original_tz} = $ENV{TZ};
$ENV{TZ} = $ctx->{client_tz};
+ $ctx->{carousel_loc} = $ENV{carousel_loc}; # let templates see it
+
my $xul_wrapper =
($self->apache->headers_in->get('OILS-Wrapper') || '') =~ /true/;
# FIXME - move carousel helpers to a separate file
$ctx->{get_visible_carousels} = sub {
- my $org_unit = $self->ctx->{physical_loc} || $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
+ my $org_unit = $self->ctx->{carousel_loc} || $self->ctx->{physical_loc} || $self->cgi->param('loc') || $self->ctx->{aou_tree}->()->id;
return $U->simplereq(
'open-ils.actor',
'open-ils.actor.carousel.retrieve_by_org',