use constant COOKIE_SES => 'ses';
use constant COOKIE_LOGGEDIN => 'eg_loggedin';
+use constant COOKIE_PHYSICAL_DEPT => 'eg_physical_dept';
use constant COOKIE_PHYSICAL_LOC => 'eg_physical_loc';
use constant COOKIE_SSS_EXPAND => 'eg_sss_expand';
$ctx->{hostname} = 'remote';
}
+ $ctx->{physical_dept} = $self->get_physical_dept;
$ctx->{physical_loc} = $self->get_physical_loc;
# capture some commonly accessed pages
$self->ctx->{saved_searches_expanded} = $value;
}
+sub get_physical_dept {
+ my $self = shift;
+
+ if(my $physical_dept = $self->cgi->param('physical_dept')) {
+ $self->apache->headers_out->add(
+ "Set-Cookie" => $self->cgi->cookie(
+ -name => COOKIE_PHYSICAL_DEPT,
+ -path => $self->ctx->{base_path},
+ -value => $physical_dept,
+ -expires => undef
+ )
+ );
+ return $physical_dept;
+ }
+
+ return $self->cgi->cookie(COOKIE_PHYSICAL_DEPT);
+}
+
# physical_loc (i.e. "original location") passed in as a URL
# param will replace any existing physical_loc stored as a cookie.
# If specified via ENV that rules over all and we don't set cookies.