my $U = 'OpenILS::Application::AppUtils';
use constant COOKIE_SES => 'ses';
-use constant COOKIE_ORIG_LOC => 'eg_orig_loc';
+use constant COOKIE_PHYSICAL_LOC => 'eg_physical_loc';
use constant COOKIE_ANON_CACHE => 'anoncache';
use constant ANON_CACHE_MYLIST => 'mylist';
$ctx->{unparsed_uri} = $self->apache->unparsed_uri;
$ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
$ctx->{is_staff} = 0; # Assume false, check for workstation id later. Was: ($self->apache->headers_in->get('User-Agent') =~ /oils_xulrunner/);
- $ctx->{orig_loc} = $self->get_orig_loc;
+ $ctx->{physical_loc} = $self->get_physical_loc;
# capture some commonly accessed pages
$ctx->{home_page} = 'http://' . $self->apache->hostname . $self->ctx->{opac_root} . "/home";
return Apache2::Const::OK;
}
-# orig_loc (i.e. "original location") passed in as a URL
-# param will replace any existing orig_loc stored as a cookie.
-sub get_orig_loc {
+# physical_loc (i.e. "original location") passed in as a URL
+# param will replace any existing physical_loc stored as a cookie.
+sub get_physical_loc {
my $self = shift;
- if(my $orig_loc = $self->cgi->param('orig_loc')) {
+ if(my $physical_loc = $self->cgi->param('physical_loc')) {
$self->apache->headers_out->add(
"Set-Cookie" => $self->cgi->cookie(
- -name => COOKIE_ORIG_LOC,
+ -name => COOKIE_PHYSICAL_LOC,
-path => $self->ctx->{base_path},
- -value => $orig_loc,
+ -value => $physical_loc,
-expires => undef
)
);
- return $orig_loc;
+ return $physical_loc;
}
- return $self->cgi->cookie(COOKIE_ORIG_LOC);
+ return $self->cgi->cookie(COOKIE_PHYSICAL_LOC);
}
};
# XXX In the future, $sort_org should be understood to be an abstration
- # that refers to something configurable, not necessariyl orig_loc.
+ # that refers to something configurable, not necessariyl physical_loc.
- if (my $sort_org = $self->ctx->{orig_loc}) {
+ if (my $sort_org = $self->ctx->{physical_loc}) {
unshift @{$query->{order_by}}, {
class => 'acp', field => 'circ_lib', transform => 'numeric_eq',
params => [$sort_org], direction => 'desc'
$sname = 'opac.patron.jump_to_details_on_single_hit';
$org = ($ctx->{user}) ?
$ctx->{user}->home_ou :
- $ctx->{orig_loc} ||
+ $ctx->{physical_loc} ||
$self->ctx->{aou_tree}->()->id;
}
}
my $sss_size = $self->ctx->{get_org_setting}->(
- $self->ctx->{orig_loc} || $self->ctx->{aou_tree}->()->id,
+ $self->ctx->{physical_loc} || $self->ctx->{aou_tree}->()->id,
"opac.staff_saved_search.size",
);
my $depth = $apache->dir_config('OILSRedirectDepth');
my $locale = $apache->dir_config('OILSRedirectLocale') || 'en-US';
my $use_tt = ($apache->dir_config('OILSRedirectTpac') || '') =~ /true/i;
- my $orig_loc;
+ my $physical_loc;
$apache->log->debug("Redirector sees client frim $user_ip");
if ($nhostname =~ m/[^\s]/) { $hostname = $nhostname; }
if($org_cache{$shortname}) {
- $orig_loc = $org_cache{$shortname};
+ $physical_loc = $org_cache{$shortname};
} else {
'open-ils.actor.org_unit.retrieve_by_shortname',
$shortname)->gather(1);
- $org_cache{$shortname} = $orig_loc = $org->id if $org;
+ $org_cache{$shortname} = $physical_loc = $org->id if $org;
}
}
if($use_tt) {
$url .= "/eg/opac/home";
- $url .= "?orig_loc=$orig_loc" if $orig_loc;
+ $url .= "?physical_loc=$physical_loc" if $physical_loc;
=head1 potential locale/skin implementation
} else {
$url .= "/opac/$locale/skin/$skin/xml/index.xml";
- if($orig_loc) {
- $url .= "?ol=" . $orig_loc;
+ if($physical_loc) {
+ $url .= "?ol=" . $physical_loc;
$url .= "&d=$depth" if defined $depth;
}
}